doc • release • 2.99.4

Gambas 3 RC4

What's new

This release is the fourth release candidate of Gambas 3.

More that 60 bugs were fixed, and the following new features were added:

  • Better support for LXDE.

  • A trick that allows the interpreter to watch existing file descriptors obtained through external function calls.

  • Many interpreter optimizations, especially in the String class.

  • Support for connections to local sockets in the gb.db.mysql component.

  • Clean-up of the following components: gb.net.curl, gb.pdf, gb.v4l.

  • Catalan, spanish and french translations were updated.

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

Thanks in advance.

ChangeLog

[DEVELOPMENT ENVIRONMENT]
* BUG: When hitting F11 to show the console, the console parent tab is now
  automatically made visible.
* BUG: When converting a Gambas 2 project, the IDE now checks that the
  project is not already opened somewhere else, and does not leave the
  backup project locked if the conversion has succeeded.
* BUG: Fix desktop detection in the system information dialog.
* BUG: Recent projects are correctly filtered now the second time the 'open
  project dialog' is opened.
* BUG: Ignore ValueBox.MaxLength property when converting a Gambas 2 form.
* BUG: Now just print a warning when creating the project directory icon is
  impossible.
* BUG: When converting a Gambas 2 project, do not try to convert symbolic
  links.
* BUG: Do not use Editor.ShowCursorPosition flag anymore.
* BUG: In the menu editor, pasting menus works correctly now.
* BUG: Selecting the movie of a MovieBox control only allows to select a
  path located in the project.
* BUG: Selecting a virtual class in the help browser tree now correctly
  shows its documentation page.
* BUG: TRY is taken into account now when converting a Gambas 2 OPEN
  instruction.
* BUG: Don't crash if a library cannot be found.
* NEW: Catalan translation updated.
* NEW: Update Catalan tips.
* NEW: When inserting an existing module, class, form... the file view
  automatically show hidden files so that the ".src" directory inside
  Gambas projects is always visible.
* NEW: Languages are sorted in the help browser's language menu.
* NEW: The help browser now shows an animation while loading a page.
* NEW: Add support for LXDE terminal in option dialog.
* NEW: Display a big message in the library tab of the project property
  dialog to tell that library must be stored in the same directory as the
  project using them.
* NEW: Spanish translation updated.
* OPT: The contents of a project item is loaded from disk only if the
  project item is visible.

[WIKI CGI SCRIPT]
* BUG: Fix the english TODO page showing not-documented symbols.
* BUG: Symbol syntax for array writing has been fixed.
* NEW: Do not use the cache anymore.
* NEW: Updated Catalan translation.

[EXAMPLES]
* BUG: Fix some form layout in the Database example.
* NEW: Updated WebBrowser Catalan translation.
* NEW: Updated TreeView Catalan translation.
* NEW: Update example project titles.
* NEW: AnalogWatch has been rewritten with the Paint class.
* NEW: Apply the gb.pdf changes to the PDFViewer example.
* NEW: Fix video examples according to the last changes in gb.v4l.

[INTERPRETER]
* BUG: Fix a type transitivity bug in Trim().
* BUG: DateAdd() does not raise an overflow error anymore when used on a
  time value.
* BUG: Really fix the way Trim() handle null strings. Now there is no
  memory leaks anymore.
* BUG: Fix a crash in stack backtrace management.
* BUG: Fix Byte[].FromString() method.
* BUG: Remove the deprecated Object.LastEventName property.
* BUG: Now incrementing or decrementing a boolean raises an error.
* BUG: Fix the declaration of SizeOf() syntax.
* BUG: When opening an existing file descriptor, correctly check the mode
  compatibility.
* BUG: Fix String.Pos(), and String.InStr() with a third argument.
* BUG: Arrays of classes exported from a component or a library are now
  automatically exported too.
* NEW: New syntax for GB.AddString() and GB.ExtendString() interpreter API.
  Do not pass the string by reference anymore.
* NEW: GB.AddChar() is a new API for adding just a char to a string.
* NEW: Split System and Application class implementation in two different
  source files.
* NEW: A trick to watch existing file descriptors: opening ".XX" in direct
  mode, where "XX" is the file descritor value.
* NEW: When opening an existing file descriptor, check that it is opened
  with a compatible mode. Otherwise raise an "Access forbidden" error.
* NEW: When opening an existing file descriptor, check its validity
  immediately.
* NEW: Param.All is a new property that returns all extra arguments as an
  array.
* OPT: Optimize some string functions by not using arguments passed by
  reference.
* OPT: Integrate the "=" operator function into the main execution loop to
  save one function call.
* OPT: Optimize string comparison functions on x86 and x64_64 architectures
  by comparing eight bytes in one shot.
* OPT: Don't use glibc memcmp() to compare strings. My own routine is a
  little faster according to valgrind.
* OPT: The UTF-8 String class routines Left(), Mid() and Right() have been
  optimized. The positions of the first 256 characters of the last string
  processed by the String class are cached.
* OPT: Some native methods can be called like any other native subroutines.
  But that can be used only inside the interpreter, not in a component.
* OPT: The '&' operator is faster now when it takes two arguments only (the
  most frequent case).
* OPT: A little optimization in string allocation.
* OPT: Optimize returning from a function.
* OPT: A little optimization in conditonal jump.
* OPT: Optimize case insensitive string comparison. Hash table code is
  consequently a bit faster.
* OPT: Optimize the inequality comparison operators by putting them into
  the gbx_exec_loop.c source file.
* OPT: Internal conversions between unicode and utf-8 have been optimized.
* OPT: String.UCase(), String.LCase() and String.Chr() have been optimized.
* OPT: Some optimizations in date formatting.
* OPT: Now() has been optimized when run multiple times during the same
  second.
* OPT: Some little optimization in natural comparison routine.

[COMPILER]
* BUG: Fix compilation of function calls having more than 32 ByRef
  arguments.

[GB.DB.FORM]
* BUG: DataBrowser is correctly updated now when its DataSource changes.
* NEW: Updated Catalan translation.

[GB.DB.MYSQL]
* NEW: If the connection host starts with a slash, then we supposed that we
  are connecting to localhost, and that the host is actually the path of
  the socket to use.

[GB.DB.NET]
* BUG: Fix ignored system call return values.

[GB.DB.SQLITE2]
* BUG: Fix ignored system call return values.

[GB.DB.SQLITE3]
* BUG: Fix ignored system call return values.
* BUG: Fix some error messages.

[GB.EVAL]
* BUG: Eval() correctly returns a value again.

[GB.FORM]
* BUG: FileView now ignores unreadable directories.
* BUG: FileView works correctly again.
* BUG: Fix the management of the ShowHidden property in FileView.
* BUG: Fix how FileView settings are saved and restored.
* BUG: Fix InputBox layout.
* NEW: DirView.Settings is a new property that allows the Settings class to
  automatically save or restore settings through its Read and Write
  methods.
* NEW: Add a Click and a Change event to the DateBox control. The Click
  event is raised when the popup is closed.

[GB.FORM.MDI]
* BUG: Workspace with bottom orientation correctly shows its tabbar again.
* BUG: Fix the shortcut editor dialog.
* NEW: Action.ConfigureToolbar has been hidden as Action._ConfigureToolbar.

[GB.GTK]
* BUG: Fix initial window position.
* BUG: Do not crash if a null key is used for a stock picture. Just return
  a null reference.
* NEW: Action.Register has been hidden as Action._Register.
* NEW: Setting the current GridView row to a valid value now automatically
  set the current column to zero if there is no current column.

[GB.NET]
* NEW: Remove the Net.MaxPathLength constant.

[GB.NET.CURL]
* BUG: Disable error code constants for unsupported curl features.
* BUG: Disable pointless constants inherited from gb.net Net class.
* BUG: Add missing error opcodes in old curl libraries.
* BUG: Really fix compilation on old versions of libcurl.
* NEW: Update CURL error codes and add some missing constants.
* NEW: Curl.ErrorText is a new property that returns the error string
  associated with the error code returned by the curl library. If
  Curl.Status is positive, then a null string is returned.
* NEW: Disable other error code constants.
* NEW: A lot of code clean-up.

[GB.PDF]
* BUG: Fix the retrieveing of index titles.
* BUG: Some fixes in classes description.
* BUG: Remove a debugging message and fix the return value of the Find()
  method.
* NEW: Add a PdfRect class systematically used for returning the
  coordinates of page elements or search results.

[GB.QT4]
* BUG: GridView: Fix how the Change event is raised in single selection
  mode.
* BUG: GridView: Fix automatic column resizing when the Resizable property
  is TRUE.
* BUG: Fix TextArea.Foreground property.
* NEW: Action.Register has been hidden as Action._Register.
* NEW: Setting the current GridView row to a valid value now automatically
  set the current column to zero if there is no current column.

[GB.QT4.EXT]
* BUG: Remove unused Editor.ShowWord() method and two unused flag
  constants.
* BUG: Fix a crash in folding procedure, by strictly folding between
  procedure limits, and by not trying to be clever with comments.
* NEW: Change the keyboard shortcuts for moving between lines having the
  same indentation. Now they are CTRL+ALT+UP and CTRL+ALT+DOWN.

[GB.REPORT]
* NEW: Updated Catalan translation.

[GB.SDL]
* BUG: Disable Cursor handling, as it is buggy and incomplete. Only default
  cursor is available.

[GB.SETTINGS]
* BUG: Settings.ReadWindow() and Settings.WriteWindow() are now private.
* NEW: Remove the useless Settings.Array() method.

[GB.V4L]
* BUG: Remove some unused local variables.
* BUG: Fix all Contrast, Hue, Bright, Color and Whiteness properties in
  VideoDevice.
* BUG: Remove the VideoDevice.Features property.

[GB.WEB]
* BUG: WebPage class is not exported anymore.
* BUG: Support for posted requests whose charset is specified in the
  "Content-Type" header.

Requirements

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

Component

Requirements
Compilation gcc g++ automake autoconf libtool > 2.0
Interpreter libffi
gb.compress.bzlib2 libbz2.so
gb.compress.zlib libz.so
gb.cairo cairo
gb.crypt libcrypt.so
gb.db.mysql libmysqlclient.so, libz.so
gb.db.odbc libodbc.so
gb.db.postgresql libpq.so
gb.db.sqlite2 libsqlite.so
gb.db.sqlite3 libsqlite3.so
gb.desktop libXtst.so
gb.gtk All GTK+ libraries >= 2.10 librsvg2.so cairo
gb.image.io gdk-pixbuf
gb.image.imlib imlib
gb.net.curl libcurl.so
gb.opengl gb.opengl.glsl libGL.so, libGLEW.so
gb.opengl.glu libGLU.so
gb.pcre libpcre.so
gb.pdf libpoppler.so
gb.qt4 gb.qt4.ext gb.qt4.opengl gb.qt4.webkit All qt 4 libraries >= Qt 4.5
gb.sdl libSDL.so, libSDL_ttf.so, libGL.so, libGLEW.so
gb.sdl.sound libSDL.so, libSDL_mixer.so
gb.v4l libjpeg.so, libpng.so,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.

Compilation

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

$ make
...

Installation

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>
...

or

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

Troubleshooting

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