Gambas 3 RC7

What's new

This release is the last release candidate of Gambas 3 before the final release, that is planned for 31 Dec 2011.

As many bugs as possible were fixed, and a few last-minute new features were implemented. Mainly:
  • A new "Gambas" highlighting theme for the IDE.

  • A new TabPanel control, that is a TabStrip with thin borders.

  • The ability to define the connection timeout in the database component.

  • gb.report is almost finished.

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

Thanks in advance.

ChangeLog

[DEVELOPMENT ENVIRONMENT]
* BUG: Correctly display error messages when the class name is not written
  with the same case everywhere.
* BUG: Correctly translate numerals inside error messages.
* BUG: Fix binary file detection.
* BUG: Fix control icon installation in components installed through an
  autotools package.
* BUG: Fix automatic completion of classes symbols when a method having the
  same name is defined.
* BUG: Fix search with patterns including a column character.
* BUG: Top-level forms now take keyboard event before every other
  control. Take that into account for the ESC shortcut.
* BUG: When showing the search dialog, the search text is correctly
  selected in all cases now.
* BUG: Importing a report (or any form that is not a GUI form) now
  correctly imports the class file.
* BUG: Do not crash if the examples directory does not exist.
* BUG: Fix management of forms that are multicontainers, like Report.
* BUG: Convert Draw.BackColor and Draw.ForeColor from Gambas 2 to Gambas 3.
* BUG: Save project before making a source archive.
* BUG: Correctly manage recent project sort in open project dialog, and fix
  the sort order corruption saved in the settings file.
* BUG: Do not require /tmp to allow executables when running the internal
  system information shell script.
* BUG: Use editor colors to display editor tooltip or errors, so that they
  are always visible.
* BUG: Fix the round rectangle drawing function.
* NEW: New "Gambas" highlight theme.
* NEW: Support for report controls round corners.
* NEW: Handle synchronize button for round corners in the ReportBorder
  chooser dialog.
* NEW: Support for the new _DefaultArrangement constant.
* NEW: Use TabPanel instead of TabStrip is a few places.
* OPT: The project file creation dialog initalizes its file browser later.

[WEB SITE MAKER]
* NEW: Design changes.

[EXAMPLES]
* BUG: In DBusExplorer replace Treeview.Find() by TreeView.FindAt()
* BUG: Fix Report demo so that it works with the current gb.report.
* NEW: Add a text clipping example in the 'Painting' example.

[INTERPRETER]
* BUG: Fix inheritance signature check for array classes.
* BUG: [Func()] now correctly raises an error if Func() does not return a
  value.
* BUG: New GB.ReturnVariant() API for methods and properties that return a
  Variant value.
* BUG: Use the new GB.ReturnConvVariant() and the GB.ReturnVariant() API
  everywhere it is needed.
* BUG: Use setpgid() instead of setpgrp() to be BSD-compatible.
* BUG: Array Reverse() method now returns the reversed array.
* BUG: Correctly free constructor arguments when there is inheritance.
* BUG: Use sigsetjmp() instead of setjmp() as expected by the memory check
  functions.
* NEW: GB.ReturnConvVariant() is a new API that ensures that the returned
  value is a Variant, as now the interpreter does not do the conversion
  automatically.
* NEW: Support for extern functions returning a C structure pointer.
* OPT: Replace() is now faster when the search string and the replace
  string are both one character length strings.

[COMPILER]
* BUG: The lowest long integer constant (-9223372036854775808) is correctly
  interpreted now.
* BUG: Correctly compile initial expression of optional arguments.
* BUG: Raise an error when the default case of a SELECT statement is not
  the last one.
* BUG: Raise an error when the default case of a SELECT statement is
  defined twice.
* BUG: Do not allow optional and byref arguments in an event declaration.
* NEW: The string escape character '\v' was added.

[GB.DB]
* NEW: Add a warning message if a connection password cannot be retrieved.
* NEW: Connection.Timeout is a new property that defines the connection
  timeout in seconds. The value is 20 seconds by default.

[GB.DB.POSTGRESQL]
* OPT: Record creation is now faster, thanks to Bruce Bruen optimization.

[GB.DBUS]
* BUG: Fix signal catching managemnt.
* BUG: Creating a DBusSignal or a DBusObserver now automatically enables
  the DBus watch. DBus watch is automatically disabled when there is no
  enabled DBusSignal or DBusObserver anymore, and when there is no Gambas
  object registered on the bus anymore.
* BUG: Fix the DBusConnection.Applications property.
* BUG: Fix application name registering.
* BUG: Fix object registering and unregistering, so that the program quits
  normally when the last object is unregistered.
* BUG: Keep the case of DBus application names.
* NEW: DBusSignal constructor takes a new optional argument that allows to
  catch signals sent to any application.
* NEW: DBusSignal has now a new Enabled property to active or deactivate
  the signal watch.
* NEW: DBusConnection.Tag is a new property.
* NEW: DBus.Name is a new property that allows to define the name used for
  registering the application on the bus. You must define this property
  before registering any object.
* NEW: DBusConnection.Register() takes a new optional argument to specify
  the interfaces implemented by the object. By default, the interface is
  "org.gambas.<appname>.<classname>".
* NEW: DBusConnection.Register takes a new optional argument to specify their
  interfaces implemented by the object. A method or a property will be
  associated with one of these interfaces only if its name begin with the
  interface name (points being replaced by underscores).

[GB.DESKTOP]
* BUG: Fix DesktopWindow state properties.
* BUG: Use the new GB.ReturnVariant() API for _Desktop.GetWindowProperty().

[GB.EVAL]
* BUG: The lowest long integer constant (-9223372036854775808) is correctly
  interpreted now.

[GB.EVAL.HIGHLIGHT]
* NEW: Some little enhancements in CSS highlighting.

[GB.FORM]
* BUG: IconPanel.Count property can be decremented without crashing now.
* BUG: Popup menu is now disabled in MaskBox control.
* BUG: IconView.Clear correctly resets the inner view dimension.
* NEW: Some design changes in the FileChooser and DirChooser controls
* NEW: The _Arrangement integer constant has been replaced by the
  _DefaultArrangement string property.
* NEW: DirChooser.Border is a new property that defines if the DirChooser
  control has a plain border or no border at all.
* NEW: FileChooser.Border is a new property that defines if the FileChooser
  control has a plain border or no border at all.
* NEW: TabPanel is new container that behaves like a TabStrip, but with a
  thin removable border.
* NEW: Wizard title look changed.
* NEW: Wizard.TextFont is a new property to define the font of the wizard
  titles.

[GB.FORM.MDI]
* BUG: Do not use symbolic links, but real image files for action icons.
* NEW: The _Arrangement integer constant has been replaced by the
  _DefaultArrangement string property.

[GB.GTK]
* BUG: Fix ColumnView column width management.
* BUG: Fix the relation between a modal dialog and its parent window.
* BUG: Fix Key.BackTab constant.
* BUG: Fix Embedder control description.
* BUG: Stop Event correctly cancels Menu events.
* BUG: Make gb.gtk compile with old versions of GTK+.
* BUG: Paint.Text() now works correctly when the alignment is not
  specified.
* BUG: Fix a warning in range control initialization (Slider, ScrollBar).
* BUG: Paint.Save() and Paint.Restore() now take the font settings into
  account.
* BUG: Printer.PaperWidth and Printer.PaperHeight now take the orientation
  into account.
* BUG: Fix dnd and clipboard management.
* BUG: Fix Printer.Print() when printing to a PS or SVG file.
* BUG: Fix Printer paper and orientation management.
* BUG: Paint.Reset() now resets the matrix to its initial value, that is
  not necessarily the identity when painting on a Printer!
* NEW: The _Arrangement integer constant has been replaced by the
  _DefaultArrangement string property.
* OPT: Don't call GTK+ gtk_widget_modify_xxx() functions if not really
  necessary, they are slow, and slower as the number of created controls
  grows!

[GB.NET]
* BUG: Correctly check system errors when using an asynchronous DnsClient.

[GB.QT4]
* BUG: Fix the relation between modal or utility windows and their parent.
* BUG: Fix ColumnView AutoResize property management.
* BUG: Fix Embedder control description.
* BUG: Paint.Save() and Paint.Restore() take the clipping path into account
  now.
* BUG: Fix cached DrawingArea so that it works with the Qt "raster"
  graphics system.
* BUG: Fix dnd and clipboard management.
* BUG: Printer.PaperWidth and Printer.PaperHeight values are rounded now.
* BUG: Don't raise the Draw event when calling the Refresh method on a
  cached DrawingArea.
* BUG: Paint.Reset() now resets the matrix to its initial value, that is
  not necessarily the identity when painting on a Printer!
* NEW: The _Arrangement integer constant has been replaced by the
  _DefaultArrangement string property.

[GB.QT4.EXT]
* BUG: Fix colorize algorithm, hoping that it will fix the undo problem.
* BUG: Fix highlighting algorithm.
* BUG: A little fix in undo management during an highlighting process.

[GB.REPORT]
* BUG: All the fixed objects are correctly taken into account during the
  sizehint computation.
* BUG: Some changes in the VSizeInt.
* BUG: Fix the HBox and Label layout.
* BUG: Now the ReportImage layout works well.
* BUG: Allow void images.
* BUG: Label keeps it's size if not expanded.
* BUG: Replace full by fill.
* BUG: The sections are not repeated.
* BUG: ReportTextLabel now use RichTextExtend.
* BUG: Some change in the containers size computation.
* BUG: Padding is now taken into account in ReportImage having fill
  stretchmode.
* BUG: MTool.PixelToUnit now takes a Float.
* BUG: Layout now correctly resets dataindex.
* BUG: Change the SizeInt for column.
* BUG: Resolve all resolution problems by computing the render size at the
  drawing time.
* BUG: Don't use the printer resolution for the layout... font.heigth
  returns a size that depend of the current device resolution. I must
  change the size computed for label and texlabel.
* BUG: Fix the problem on font size by use paint.resolution on font.height.
* BUG: Remove the Report11.report file that was alone, without any class
  file.
* BUG: Now the full layout really resets all sections.
* BUG: Fix preview so that no useless scrollbar is displayed in "fit to
  page" mode.
* BUG: Fix the round rectangle drawing function.
* BUG: Fix on the clip size
* BUG: Define the _DefaultArrangement property for containers.
* BUG: Really resolve the problem of cut row at the bottom of the page.
* NEW: A new property DataCount in ReportContainer that repeats the
  container, and increments the internal index.
* NEW: A new Data event in ReportLabel.
* NEW: A new Data property to return the data during the Data event.
* NEW: The ReportImage has now a Data event and a Data property.
* NEW: The Autoresize is active.
* NEW: ReportTextLabel and ReportSvgImage work.
* NEW: The boolean Strech property of ReportImage becomes StrechMode
  property and can have 3 different modes: None (the default),
  Proportional, Fill.
* NEW: A new Alignment property in ReportImage that can take value from the
  Align class, and set the alignment of the picture in Reportimage.
* NEW: ReportControl has a new DataIndex property that gives the current data
  index.
* NEW: Now use CTRL key + mouse wheel to zoom on preview.
* NEW: Round corners are activated. For example:
  Label.Border.RoundCorner.TopLeft = "2mm/4mm"
  If round corners are used, all borders have the same color and the same
  size at the moment.
* NEW: ReportTextLabel has now a Data event and a Data property.
* NEW: Start to implement ReportDrawingArea widget. It's a simple widget
  with a Draw event.
* NEW: The clipping is active so now text & picture cannot be drawn outside
  of their containers.
* NEW: A new property on ReportLabel, "Rotate", that allows to give an
  angle to the text. The text is always centered if an angle is given.
* NEW: ReportVPanel widget and Arrange.Column arrange controls in columns
* NEW: New Paper and Orientation properties that allow to setup the printer
  size, and so the preview size.
* NEW: Print function that allows to bypass the preview window and just
  shows the printer config window.
* NEW: ReportSvgImage has the same properties than ReportImage:
  StretchMode, Alignment.
* NEW: Use space instead of slash as separator inside ReportBorder property
  values.
* OPT: Changes in the label layout.
* OPT: Many changes in the code layout. All controls use now common
  routines, so they act strictly the same way with less codes lines.
* OPT: Some hidden properties added to ReportPadding.
* OPT: The WordWrap property has been removed.
* OPT: Report internally manages the paper size.

[GB.SDL]
* BUG: Add missing Gl.PolygonOffset method.

[GB.SETTINGS]
* NEW: Use a temporary file when saving a settings file, and always make a
  backup.

[GB.SIGNAL]
* BUG: Fix some warnings on BSD.

[GB.WEB]
* NEW: Session.Modify is a new property to mark the session as modified so
  that it is automatically saved.

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