[Gambas-user] Release of gambas 1.9.14

Benoit Minisini gambas at ...1...
Sat Jul 30 17:28:44 CEST 2005


Hi, all guys.

Here is a new release of the development version that you can get there:

http://prdownloads.sourceforge.net/gambas/gambas2-1.9.14.tar.bz2?download

Now making Gambas components in Gambas really works :-)

The development environment gets a new font selection dialog and a new color 
selection dialog both based on two new controls made with Gambas.

Here is the complete Changelog:

--8<---------------------------------------------------------------------------

CONFIGURATION

* BUG: Finally applied the "fish jail" :-) patch of Dirk Mueller to the 
  symbolic link creation.
* BUG: Components directory including a gambas part are now correctly 
  packaged.

DEVELOPMENT ENVIRONMENT

* New font and color dialogs in the property sheet.
* The welcome, about and tips dialog now use the system colors.
* Symbols including an underscore are not displayed anymore in the 
  completion list.

COMPILER

* BUG: events from gambas classes are now internally prefixed with a colon, 
  as the events from native classes.
* The bytecode version is now written in each compiled class.

INTERPRETER

* BUG: Now a native class can have a static property that returns a usable
  virtual class.
* If the bytecode version of a compiled class is different from the bytecode
  version of the interpreter, then an error is raised.
* BUG: Many fixes in the gambas archive management. Now everything should 
  work as expected :-)
* The Boolean[] array class was implemented.
* Object.GetProperty() now can return the value of static properties.
* BUG: Classes located in gambas archives are now freed with the global 
  classes when the interpreter ends.
* BUG: Format$(0, "+#") now works correctly.
* A new property, Application.Dir, that returns the application startup 
  working directory at startup. Note that the current working directory 
  is modified by the interpreter.
* BUG: Hex$() and Bin$() now correctly display negative values.

QT COMPONENT

* Eight new properties in Color class that returns system colors.
* A new array operator in Color class to split a color in its Red, Green, 
  Blue, Alpha or Hue, Saturation, Value parts.
* BUG: Some fixes in the arrangement algorithm of containers.
* BUG: The DrawingArea draws its border correctly again.
* A new property, Font.Scalable, that returns if a font is freely scalable.
* A new property, Font.Grade, that represents a predefined font size
  proportional to the default application font. Range from -9 to +9.
* A new control, UserControl, that acts as a parent class for implementing 
  user controls directly in Gambas.
* A new method, ScrollView.EnsureVisible, that ensures that a specified
  area of the ScrollView is visible.
* A new property, TextArea.ScrollBar, to choose the display policy of the
  scrollbars.
* A new class, TrayIcons, for enumerating all TrayIcon controls.
* New properties in the TrayIcon class: Tag, ScreenX, ScreenY, Width and 
  Height.
* BUG: TrayIcon now catches Enter and Leave events.
* BUG: The Design property now works with controls written in Gambas.
* BUG: Some fixes in Open event trigerring of embedded forms.
* Three new controls made with Gambas: FontChooser, ColorChooser and 
  CustomListBox.

DATABASE COMPONENT

* A new method, CConnection.Subst(), that converts gambas values into 
  the underlying database SQL syntax, and substitutes them in a query
  string.
* BUG: Result can manage tables whose primary keys are not the first fields
  of the table.
* BUG: Result enumeration are deletion-safe now.
* BUG: You can use variant values with functions that use substitution.

GTK+ COMPONENT

* Updated.

SDL COMPONENT

* Updated.

OPENGL COMPONENT

* Updated.

--8<---------------------------------------------------------------------------


ABOUT THE GAMBAS COMPONENTS MADE IN GAMBAS THING

The source of these controls is the "gb.qt" gambas project located in the 
gb.qt component source directory. At the moment, it is part of this 
component, but it may become an independent component in the future.

How does it work concretely ?

I added a new control named "UserControl", and every user control made in 
Gambas should inherits it. This control is just a container with no 
properties. I just embedded a Form inside it.

Why is Usercontrol needed ?

Because if you use a form as a component, the user will see all its public 
properties and event handlers. By embedding the form, I can provide to the 
user a control with the interface I want, and this way hide all the specific 
stuff located in the embedded form.

UserControl is a container with no properties, and its internal Arrangement 
property set to 'Fill'. But it is not declared as a usable control to the 
IDE.

The simpler for understanding is looking at the sources :-)

For example, the ColorChooser control embeds a form named FColorChooser, and 
in the IDE you will only see ColorChooser. The internal FColorChooser is 
completely hidden.

As you may know ;-) Form controls are their own event observer. So I attached 
the FColorChooser to ColorChooser to get all events generated by the Form, 
and raised back the events like Form_Open or Form_Resize that the form needs 
to work.

I am not completely satisfied with that, but at the moment it is the only way 
I found to make user controls behave like I wanted.

In the future, I may implement something like UserContainer, to help 
implementing user controls that have containers.

Note that components made in Gambas work exactly like any executable projects. 
They can include all the resource files they need, and their own 
translations.

Please look at that as much as possible :-) This is the base for a future 
implementation of components like:
- Complex controls like FontChooser or ColorChooser: FileChooser, DirChooser, 
anything you can imagine.
- Controls bound to database.
- Report designer.
- WebForm designer.
- Gambas MDI windows.
...

The limit is time and imagination :-)

Enjoy it!

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list