doc • release • 2.99.2

Gambas 3 RC2

What's new

This release is the second release candidate of Gambas 3.

More than one hundred bugs were fixed everywhere, and the following new features were implemented:

  • A new Lithuanian translation.

  • The CSV import is more clever.

  • The menu editor has been redesigned.

  • The code formatter has been enhanced.

  • Many new OpenGL examples were added.

  • A new control, DataComboView, that replaces the old DataComboMulti.

  • Exist now takes a new optional boolean argument, that tells the interpreter if symbolic links must be followed or not.

  • The Application.Return property has been removed. Now, to define the process exit value, just return it from the Main function.

  • MySQL 5 BIT field datatype is supported.

  • Support for the https protocol in the HttpClient class.

  • Support for any mime type and any charset in SmtpClient.

  • A lot of new functions were added to the OpenGL components.

  • Support for fade in and fade out in the gb.sdl.sound component.

As usual, please report any compilation and packaging problem on the mailing-list!

Thanks in advance.


* BUG: Remove generated files.
* NEW: Update FSF address in every source file.

* BUG: Fix keyboard handling in editor procedure list.
* BUG: In the procedure list, finding a procedure by typing its name
  correctly scrolls the list.
* BUG: Classes coming from libraries are correctly taken into account in
  automatic completion now.
* BUG: Fix the layout of the help window the first time it is shown.
* BUG: Don't fail when there is no IDE settings file yet.
* BUG: When loading a Gambas 2 project, GridView.Data BackColor and
  ForeColor properties are correctly converted.
* BUG: Fix Autotools project packaging.
* BUG: Autotools project packaging cannot handle extra packages
* BUG: Autotools project packaging does not handle extra files
  dependencies yet. It will be fixed later.
* BUG: Fix loading of old Gambas 3 projects without ".src" directory.
* BUG: Multi-dimensional arrays are now correctly displayed by the
* BUG: Circular inheritance does not freeze the automatic completion
* BUG: Do not hide balloon message displayed on the project tree
* BUG: Do not increment the version release number anymore when making an
  installation package.
* BUG: Remove the "Show toolbox" menu entry. Its behaviour was not
  intuitive at all.
* BUG: Clicking on a void index table in the database editor does not crash
* BUG: Add missing pkgdesc entry in the PKGBUILD.
* BUG: Don't crash when scanning a class, if that class inherits a form.
* BUG: Starting a new search automatically resets the search list.
* BUG: Double-clicking on a control while the project is running does not
  try to insert an event handler anymore.
* BUG: Hidden exported classes cannot be controls!
* BUG: Modifying table fields and indexes many times now works correctly.
* BUG: Fix drag & drop between two IDE windows.
* NEW: The recent files list should be correctly refreshed now if another
  Gambas instance updates it.
* NEW: Czech translation updated.
* NEW: Lithuanian translation made by Regimantas Baublys.
* NEW: Add support for latin language.
* NEW: Use the new Application.ShowTooltips property.
* NEW: Update Catalan translation.
* NEW: The database editor now can export table data and request results to
  CSV files.
* NEW: Handle the "_property" special method in automatic completion.
* NEW: Change default code snippets.
* NEW: Hitting ENTER inside a comment line automatically begins a new
  comment line. Using SHIFT disables that feature.
* NEW: "Pretty print" is now "Format code".
* NEW: New option tab the code formatter in the option dialog.
* NEW: An option to format code when loading or saving a file.
* NEW: The menu editor has been redesigned.
* NEW: Pretty printer now acts on selected text.
* NEW: CSV import and automatic field conversion now can deal with both
  localized and non-localized data (i.e. floating point numbers with point
  or comma).

* BUG: The front page now is correctly version dependant.
* BUG: Do not add "v3" at the end of a link that has "v2" explicitely.
* NEW: Use a combo-box now for selecting the current version.
* NEW: Update Catalan translation.
* NEW: Automatic OpenGL documentation.

* NEW: Activate the Gambas 3 download button.
* NEW: Czech translation updated.
* NEW: Update for Gambas 2.23.1.

* BUG: Remove printing from BarCode example, it does not work anymore.
* NEW: A new example based on the GNU Scientific Library, made by Juergen
  Zdero and modified by me.
* NEW: Lighttable: menu added for opening a new folder.
* NEW: Update Catalan translation of few examples.
* NEW: Add the NeHe OpenGL examples compiled by Kevin Fishburne. There are
  two projects: one that includes all examples, and another one that is
  a GUI shell for compiling and running those examples.
* NEW: Use the new OpenGL constants names in OpenGL examples.
* NEW: Add the forgotten TunnelSDL example.
* NEW: Use the new OpenGL constants names in the 3DWebCam example.

* BUG: Recursive release of pending objects at program's end is more robust
* BUG: Using "AM/PM" in date format does not confuse next date to string
  conversions anymore.
* BUG: Fix conversion from floating point number to date when the number is
* BUG: Eval("Me") does not crash anymore.
* BUG: [...] now correctly returns a boolean array when its arguments are
  all booleans.
* BUG: Fix a possible memory leak if the [...] array creation operator
  fails for any reason.
* BUG: Write and Read instructions now deal with NULL values without crashing.
* BUG: Translatable string constants are now correctly translated when they
  are used as public symbols.
* BUG: Fix escaped characters handling in date format strings.
* NEW: Stream.Lines is a new property that allows to enumerate a stream
  line by line until end of stream is reached.
* NEW: '_property' is a new special method that must return TRUE when an
  unknown symbol (stored in Param.Name) is a property. If that special
  method is not implemented, all unknown symbols are methods.
* NEW: Remove the deprecated constant gb.Text.
* NEW: Param.Property has been removed.
* NEW: Remove the GB.IsProperty() API, that is useless now.
* NEW: Byte[].FromString() is now a static method that creates a new byte
  array from a string.
* NEW: Remove the unused GB.ExistFile() API.
* NEW: Exist() now takes an additional optional boolean argument that tells
  if symbolic links must be followed, like Stat().
* NEW: Remove useless Qt 3 shared library preloading support.
* NEW: Support for profiling. Not activated.
* NEW: Centralize signal handler management.
* NEW: The Main startup function now can return a value. If that value is
  an integer or a boolean, then it will be the exit value returned to the
  parent process.
* NEW: The Application.Return property has been removed.
* NEW: Be more robust with native method signatures that forget the ';' at
  the end of a class name, provided that a brace follows.
* NEW: Abort if a native class declares the same symbol twice.
* NEW: Two more standard error messages declared in gambas.h

* NEW: Handle the new '_property' special method. That method must be
  public, dynamic, takes no argument, and must return a boolean.

* NEW: Don't abort if the executable flags of the resulting file cannot be
  set, because the file system has been mounted with the "noexec" flag (for

* BUG: Don't require /tmp to allow executable files.
* BUG: Running a script now correctly returns the value specified by
  the Application.Return property.
* NEW: The name of a cached compile script is now the name of the original
  script stored in a directory whose name is the MD5 sum.
* NEW: Use the new way of defining the process exit value.

* BUG: Type mismatch error is correctly raised now when setting the value
  of a Result field.

* NEW: DataSource.Count is a new property that returns the number of
  records of the DataSource.
* NEW: Replace the DataComboMulti control by a DataComboView control. It is
  not completely well tested, but it works better than its predecessor.
* NEW: Data controls icons were redesigned.
* NEW: Do not resize automatically the rows in DataView.
* NEW: In Dataview, only resize the current row.

* BUG: When creating a table, use "ENGINE" keyword instead of "TYPE" with
  MySQL >= 4.0.18.
* NEW: Support for MySQL 5 BIT(x) field datatype.

* BUG: Fix a stupid crash that occurs on 64 bits systems only.

* BUG: Use the new special method _property to implement DBus properties.
* BUG: Settings a DBus property does not freeze anymore. But there is
  memory leak yet.
* BUG: Fix a memory leak when sending a DBusVariant object.
* NEW: Add a DBusConnection.Unregister method to unregister a Gambas object
  from the bus. When all objects are unregistered, the application can

* BUG: Fix drawing of colorized dates in the DateChooser control.
* BUG: Wizard containers is now an exported hidden class, so that
  automatic completion works in the IDE.
* BUG: Setting the ScrollArea.Painted property works correctly now.
* BUG: Really fix the problem with ScrollArea having the Painted property
* BUG: IconView MoveFirst(), MoveNext(), MovePrevious() and MoveTo()
  methods now correctly return TRUE when no item is available.
* NEW: Add an "open in file manager" action in FileChooser and DirChooser
  controls, when the gb.desktop component is loaded.
* NEW: Czech translation update
* NEW: Update Catalan translation.
* NEW: IconPanel now automatically resizes the left panel to fit its
* NEW: The IconPanel left panel now correctly resizes itself to fit its
* NEW: IconPanel takes the mouse wheel into account now.

* NEW: Czech translation update
* NEW: Update Catalan translation.

* BUG: Remove some debugging stuff in the Printer class.
* BUG: Correctly raise Show and Hide events in the Watcher class.
* BUG: Application.ShowTooltips really works now, and apparently it is not
  desktop-wide, but application-wide as expected.
* BUG: Clean up the MovieBox implementation.
* BUG: Clean up the PictureBox implementation.
* BUG: Fix the PictureBox aligment property.
* BUG: The Printer End event is correctly raised now.
* BUG: Fix a crash in GridView when the gb.gtk component shared library is
* BUG: Fix two crashes in GridView control.
* BUG: Compile again with GTK+ 2.x.
* BUG: Fix how popup windows are displayed.
* NEW: The Application.Tooltip virtual class has been removed.
* NEW: Application.ShowTooltips is a new property to define if tooltips are
  visible or not.
* NEW: MovieBox.Alignment is a new property that defines the alignment of
  the movie inside the MovieBox frame.
* NEW: GridView.Columns[].Expand is a new property that allows to define if
  a column automatically expands to fit the GridView visible width,
  provided that the GridView.AutoResize property is set. If no column has
  its Expand property set, then the last column will expand anyway.
* NEW: Remove the Window.Type property and the WindowType class.

* BUG: Image.PaintImage() incorrectly handled alpha channel compositing.

* BUG: Fix HttpClient URL property.
* BUG: HttpClient.Post and HttpClient.Put are now more tolerant when
  checking the Content-Type validity.
* BUG: Refuse void URLs in HttpClient and FtpClient.
* NEW: Support for the https protocol in the HTTP client.
* NEW: The default HttpClient user-agent string is now (on Linux):
  "Gambas/3.0 (; Linux)"

* BUG: Search openssl in '/usr/bin' or '/bin', and raise an error if it is
  not found.
* BUG: Don't crash if the subject is void.
* NEW: Allow the subject to be a void string.
* NEW: Support for any mime type and any charset in SmtpClient.

* BUG: No need to search for glu.h file.
* BUG: Use pkg-config to detect needed libraries, should fix building on OSX.
* BUG: Restore prefix GL in glew header inclusion for debian based packages.
* BUG: Correctly specify the number of color components when using an Image
  in an OpenGL function: glTexImage1D, glTexImage2D, gluBuild2DMipmaps...
* BUG: In GLeval.c changed GB_SINGLE to GB_FLOAT to make Gl2Map work.
* BUG: Three constants and methods had the same name. So I added an
  underscore to these constants to fix that. Now you must use GL.ACCUM_,
* BUG: Doubled definition of TEXTURE_RECTANGLE_ARB - removed one.
* NEW: Add support for GL evaluators, some associated Gets are missing.
* NEW: Gl.CheckExtensions() to check the openGL driver extensions/ability
* NEW: Multitexture mapping constants and gl.ActiveTexture function.
* NEW: Add some FramebufferObject extension functions.
* NEW: Add all constants for GL_EXT_framebufferobject extension
* NEW: Remove "GL_" from the constant names in the Gl class. The old
  constant names are supported, but emit a warning message.
* NEW: Add methods Gl.BindRenderbufferEXT(), Gl.GenRenderbuffersEXT() and
* NEW: Add Gl.DeleteFramebuffersEXT(), Gl.DeleteRenderbuffersEXT(),
  Gl.IsFramebufferEXT() and Gl.RenderbufferStorageEXT() methods.
* NEW: Add Gl.FramebufferRenderbufferEXT(), Gl.FramebufferTexture1DEXT(),
  Gl.FramebufferTexture3DEXT(), Gl.GenerateMipmapEXT(),
  Gl.GetRenderbufferParameterivEXT() methods.
* NEW: Add support for GL_ARB_texture_rectangle extension.
* NEW: Add Gl.EvalCoord2fv() evaluator method.
* NEW: glTexGen and glMultiTexcoord functions.

* BUG: Restore prefix GL in glew header inclusion for debian based packages.
* BUG: Remove FramebufferObject extension functions from glsl component.
* NEW: GLSL attribute variable definition and setting functions.

* NEW: Nurbs functions.
* NEW: Basic quadratic shapes (sphere, cylinder, cone, disk).
* NEW: Remove "GLU_" prefix from GLU constants.
* NEW: Add many GLU constants used by the GLU methods implemented in the
* NEW: Add Glu.QuadricOrientation() and Glu.QuadricDrawStyle() methods.

* BUG: Make gb.pdf compile with poppler 0.17.

* BUG: GridView default background and foreground colors are correctly
  taken into account now.
* NEW: The Application.Tooltip virtual class has been removed.
* NEW: Application.ShowTooltips is a new property to define if tooltips are
  visible or not.
* NEW: MovieBox.Alignment is a new property that defines the alignment of
  the movie inside the MovieBox frame.
* NEW: GridView.Columns[].Expand is a new property that allows to define if
  a column automatically expands to fit the GridView visible width,
  provided that the GridView.AutoResize property is set. If no column has
  its Expand property set, then the last column will expand anyway.
* NEW: Remove the Window.Type property and the WindowType class.

* BUG: Fix how the cursor is ensured to be visible in the Editor class.
* BUG: Some fixes in the undo/redo management of the Editor class.
* BUG: Fix an uninitialized variable in GEditor class.
* BUG: Fix undo/redo management in Editor control.
* BUG: In Editor, fix handling of text lines having non-ascii characters

* NEW: Czech translation update
* NEW: Add Catalan translation.

* BUG: Enable stencil buffer support.
* BUG: Use pkg-config to properly detect dependencies.
* BUG: Restore prefix GL in glew header inclusion for debian based packages.
* BUG: SDL_ttf prior to 2.0.10 doesn't provide pkg-config file, so add manual checking of files.
* BUG: Add missing linking against libXcursor.
* BUG: fix a typo in
* BUG: Redesign the way keyboard events are processed, so that SDL
  constants are used. Consequently, all Key constants now work, but '1' and
  '&' have different codes on a french keyboard. Key.Text works too.
* BUG: Key[x] works correctly with letter keys now.
* NEW: Key.Repeat is a new static property for enabling keyboard

* BUG: Allocating more than 8 channels now works correctly.
* NEW: Implement support for fade in and fade out in the Sound and Channel
* NEW: The maximum number of channels is now 64.

* BUG: Use a lock to prevent simultaneous writings of the same settings
* NEW: The Settings.Path property has been renamed as Settings.DefaultDir.
* NEW: Now Settings.Path returns the path of the settings file on the disk.

* BUG: JSON.Decode() now returns NULL if there is no token in the input


To compile Gambas, you must install the following libraries on your system :


Compilation gcc g++ automake autoconf libtool > 2.0
Interpreter libffi
gb.cairo cairo
gb.gtk All GTK+ libraries >= 2.10 cairo gdk-pixbuf
gb.image.imlib imlib
gb.opengl gb.opengl.glsl,
gb.qt4 gb.qt4.ext gb.qt4.opengl gb.qt4.webkit All qt 4 libraries >= Qt 4.5
gb.v4l,,Video4Linux >= 2.0
gb.xml libxml-2.0
gb.xml.xslt libxslt

And do not forget to install all related development packages!

Try to always use a recent version of these libraries.

In order to compile the development environment, you have to compile the following components:

You must have the right to write to /tmp, otherwise Gambas will not work.

This package was done with the following versions of GNU tools on Ubuntu 10.10:

  • automake 1.11.1

  • autoconf 2.67

  • libtool 2.2.6b

Compilation & Installation

Check installation

First, check that you installed all the needed libraries, and especially all the development packages.

Do not forget to look at the Compilation & Installation page. Maybe you will find important information specific to your distribution.

Source package configuration

When you are sure that everything is installed, type the following magic sentences in a shell.

'$' represents your shell prompt, and '...' are the messages printed during the configuration and compilation.

First, type that to create the configuration scripts.

$ ./reconf-all

Then type that to analyze the current system and configure the package:

$ ./configure -C

If a library or a development package is missing, then you will be warned that some components are disabled.

There are more 'configure' specific explanations in the INSTALL file located in the top-level source directory. I invite you to read them.


If everything is configured without error, then run this command to compile the program:

$ make


If everything compiles without error, then enter this command to install everything:

You must be root to install Gambas on your system.

$ su -c "make install"
Password: <Type the root password here>


$ sudo make install
Password: <Type your password here>


If you did several successive compilations, after having updated the source from the subversion repository for example, and if something fails during all this process, you can try to "reconfigure" the configuration scripts by typing the following command:

$ ./reconf-all

Then you can run ./configure -C again

If it does not work, I need to know what happened exactly. To do so, type the following command :

$ ( ./configure -C; make; make install ) > output.txt 2>&1

And send me the file "output.txt" by mail, with every other detail about your computer and your distribution you find useful.

Running Gambas

If everything was fine, type "gambas3" to run the development environment.

Enjoy it !

See also