[Gambas-user] More odd IDE problems

Benoit Minisini gambas at ...1...
Sun Jan 4 23:54:28 CET 2009


On dimanche 4 janvier 2009, richard terry wrote:
> This one is really weird, I enclose the pictures, but have not been able to
> reproduce it reliably.
>
> Something changed a character in the Form definition of a couple of forms,
> replacing an integer in Spacing = 2 to Spacing = T on all the occurrences
> in the form definition.
>
> What I'd done is this:
>
> I'd compiled 1777 after all my difficulties. It complained saying I needed
> to re-compile the project which I did. It then decided that
> panel.backcolour didn't exist as a property, so I changed that to
> Background and it got past that. It then popped up an error message that
> 'Bottom' was not found.
>
> As the only thing with a Bottom property that I could think of was the tab
> control I tried to change the orientation of the tab to Bottom in the
> properties box. This didn't work. So I deleted the tab and put back on a
> new one which did. I then moved the position of it up the screen a bit and
> ran the program > the resultant errors about the 'T'.
>
> Also in the project components window there was no scroll bar.
>
> Really weird.
>
> I downgraded. to 1744 my last reliable but will build again today upgrade
> and see what happens.
>
> Regards
>
> Richard

When using the development version, you should *carefully* read the *entire* 
changelog of each version.

The Spacing property is now a boolean property. In other words, spacing can 
just be 0 pixel or Desktop.Scale pixels. The Margin property is a new 
property that is a boolean, and acts a padding of 0 or Desktop.Scale pixels. 
The old Padding property didn't change, and just adds its effect to the 
Margin property.

You must use the "Update all forms" menu entry in the IDE to automatically 
update the value of the Spacing property. 0 is replaced by FALSE, and any 
other value by TRUE.

For small spacing like you did (2 pixels), you must find another way of doing 
what you want: for example, you can use arranging containers and panels for 
doing arbitrary spacing.

I did that to try to force people to do cleanly spaced GUI, and to simplify 
the most common case of layouting.

The second problem is: the TabStrip.Top and TabStrip.Bottom constants were 
removed. Now TabStrip.Orientation uses Align.Top and Align.Bottom. But the 
conversion is not automatic, so you must do it by hand.

Why that? Because now Gambas 3 checks that, when a symbol is overridden in an 
inherited class, its type is consistent: a property must stay a property, a 
method must stay a method. See the new error #63 for the rules in the wiki 
documentation: http://gambasdoc.org/help/error/override.

Gambas 2 don't check anything, so if you go wrong, like I did in TabStrip by 
overriding the Control Top & Bottom properties by two constants (!), you can 
easily crash the interpreter.

As Gambas 3 should be cleaner than Gambas 2, he does the check, and raises an 
error when loading the class.

The other classes affected by this change are Window and Workspace.

The scrollbars that disappeared now came back since revision #1779.

Sorry for the inconvenience! But this is the joy you get when using a 
development version. :-)

-- 
Benoit Minisini




More information about the User mailing list