V6.86 (beta) is available

Erel

B4X founder
Staff member
Licensed User
Longtime User
The next beta version is available, replacing the previous one (same location).
This version fixes several bugs including the inaccurate screen size which existed ever since v1.0. Thank you agraham for your help on this one.

There are some small new features:
- new keyword: FileFlush - flushes the file stream and writes the cached data to the file.
- Form.Visible - Read only property which can be used to tell if a form is visible.
- Labels text color changes to gray for disabled labels (this is actually a bug fix).
- Shorter syntax for declaration of multiple variables:
The following code:
B4X:
Dim x, y, z As Number
Will declare all three variable with the Number type.
The rule is that there must be only one type in the declaration line and it must be after the last variable.

The final version should be very similar to this one (and not so far away...).
 

moster67

Expert
Licensed User
Longtime User
Great work,

I am at the office but a quick question:

is it possible also to assign a value while declaring (everything in one line), for instance:

B4X:
Dim x as Number = 3

- Shorter syntax for declaration of multiple variables:
The following code:
B4X:
Dim x, y, z As Number
Will declare all three variable with the Number type.
The rule is that there must be only one type in the declaration line and it must be after the last variable.

The final version should be very similar to this one (and not so far away...).
 

agraham

Expert
Licensed User
Longtime User
fixes several bugs including the inaccurate screen size
Well almost! :sign0013:

There seems to be an off-by-two in the width in the desktop IDE :(. In the Designer, Tools->Screen Size for a new Form shows a width of 242 although the Form is actually 240 wide when run on the desktop. Pressing the Default button sets the width to 240 which makes the window 238 wide at runtime.

Also in the Designer the disabled width and height textboxes for a Form permanently show 240 and 264 regardless of the actual Form size - and anyway 264 is wrong for a default screen, it should be 268.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
is it possible also to assign a value while declaring (everything in one line)
That is currently not possible.

Well almost!
sign0013.gif


There seems to be an off-by-two in the width in the desktop IDE
frown.gif
. In the Designer, Tools->Screen Size for a new Form shows a width of 242 although the Form is actually 240 wide when run on the desktop. Pressing the Default button sets the width to 240 which makes the window 238 wide at runtime.

Also in the Designer the disabled width and height textboxes for a Form permanently show 240 and 264 regardless of the actual Form size - and anyway 264 is wrong for a default screen, it should be 268.
Thanks Andy. Will be fixed. (Doh!)
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Dim x, y, z As Integer, a, b, c As Boolean

This seems to work OK, is it intended to?
What do you mean with "work OK"? The integer type is only applied to 'z' and the boolean is only applied to c.
Compare these programs:
B4X:
    Dim x, y, z As Integer
    Dim a, b, c As Boolean
    Msgbox(a,x)
B4X:
    Dim x, y, z As Integer, a, b, c As Boolean
    Msgbox(a,x)
 

agraham

Expert
Licensed User
Longtime User
What do you mean with "work OK"?
Sorry, I misinterpreted the change that you had made as always applying a trailing type to a comma separated set of variables without an explicit type so changing the behaviour compared to 6.85. I assumed (always dangerous!) that the previous form was not accepted. I think it is potentially confusing to have both forms available

Dim x, y, z As Integer
Dim x, y, z As Integer, a, b, c As Boolean

where x is of Integer type in the first line and of String type in the second line.

By chance I tested the types of z and c in a code fragment using the second line and it appeared to work, I should have checked the other variables as well and then I would have seen my mistake.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I think it is potentially confusing to have both forms available
I tend to agree. Maybe it is better to apply the given type to all leading variables even if it is not the last type.
So this line will declare three integers and three booleans:
B4X:
Dim x, y, z As Integer, a, b, c As Boolean

Need to think about it a little bit more.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I was used to VB6 where
Dim a, b, c As Integer
a Variant
b Variant
c Integer

Best regards.

This was my first approach as well. Actually I wasn't aware to the fact that they change it in VB .Net.

The problem I see with this syntax (besides being a little bit annoying) is that if a user intended to declare three numeric variables but mistakenly declared only the last variable, it will be very difficult for him to find out about this problem as the Variant variable (or string in Basic4ppc) will automatically be converted as required and he will get no error.
Here is one first example of this error: http://www.b4x.com/forum/beta-versions/5494-performance.html
I believe that this is a very common mistake.
 

Zenerdiode

Active Member
Licensed User
I've just tried the download link and it's just timing out... :confused:

I'll try again shortly.

*Edit*

Ahem, (cough) I spoke too soon. :)
 
Last edited:

Zenerdiode

Active Member
Licensed User
- Labels text color changes to gray for disabled labels (this is actually a bug fix).

Erel,

I'm still not seeing this. :sign0013:

Also, I thought the truely disabled control is grey with a very slight white shadow?
 

Attachments

  • V6.86 Test.JPG
    V6.86 Test.JPG
    14.3 KB · Views: 199
Top