[Gambas-devel] Release of gambas 1.9.13

Benoit Minisini gambas at ...1...
Sun Jul 24 19:02:21 CEST 2005


Here is a new release of the development version.

Many big changes there, some of them being experimental: 

* The source package structure has been redesigned a little, and now uses
  symbolic links so that size is reduced. 
* The configure script does not use $(ROOT) anymore, but only $(DESTDIR).
  Maybe making binary packages with rpmbuild is broken... 
* The IDE now stored control coordinates proportionally to the system font
  height. THIS IS EXPERIMENTAL, BE CAREFUL WITH YOUR PROJECTS! 
* Extern functions can be public. 
* The interpreter uses mmap() to load executables and components written in
  Gambas. 
* Each component can have a part written in C/C++ and a part written in
  Gambas. 
* Enumerable container classes now know when they are enumerated so that they
  can safely delete their elements. 
* Some new functions and instructions: DEBUG, ERROR, Week(), DFree(). 
* Some new syntaxes in File.Dir(), File.Ext(), File.Name() and
  File.BaseName(). 
* The TrayIcon class was implemented. 
* The OpenGL beta component was included. 

And many bug fixes of course... 

Please read the ChangeLog carefully before using this release! 

1) The IDE storing proportional coordinates stuff is a way of having dialog 
boxes that adapt themselves to the user screen, by looking at the size of the 
font it uses.

To convert a project to this feature, open it, open all forms, move all of 
them, and save the project back. The absolute coordinates are replaced by the 
scaled ones.

BE CAREFUL! You may lose your projects if I made a bug, as the form files are 
modified.

2) There is a new iterator class named Enum that is used internally to 
implement the FOR EACH instruction.

Try this code in older versions of Gambas:

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

DIM cCol AS NEW Collection
DIM iInd AS Integer
dim sElt AS String

FOR iInd = 1 TO 8
  cCol[iInd] = Chr$(64 + iInd)
NEXT

FOR EACH sElt in cCol
  IF sElt = "E" THEN cCol.Clear
NEXT

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

If it doesn't crash, you are lucky, but try it with valgrind...

This new iterator class allows the Collection class to deal with elements 
removing while being enumerated. In the example, the enumeration is stopped 
by the Clear method. Removing one element will make the enumeration jumps it.

There is three new functions in the interpreter API for component developers 
that have enumerable classes whose elements can disappear without notice.

I will write more about that when I will start filling the new documentation 
system with updated information on how to program components.

3) Now components can have a part written in gambas. To do that, just add a 
gambas project inside the 'src' sub-directory of the component, having the 
same name as the component. That's all :-)

Note that components Makefile.am were modified. Now they all share the same 
base, located in the component.am file. This file is included in all 
component Makefile.am, and do all the stuff of installing the *.component 
file, compiling the gambas part of the component, and generating the 
information files for the IDE.

Enjoy it!

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




More information about the Devel mailing list