doc • release • 3.13.0

Gambas 3.13.0

What's new?

This release fixes some disturbing bugs in Gambas 3.12, and add the following features:

  • Support for automatic translation in the IDE.

  • JIT compilation is now done in background, speeding up program start.

  • File.RealPath() to canonicalize a path, removing all its symbolic links.

  • Array.SortUsing() to sort an array using an order defined by another array.

  • Array.Shuffle() to randomly shuffle the contents of an array.

  • TimeBox, a new control to enter durations.

  • Enhancements to the gb.map component.

  • Enhancements to the gb.media component

Compilation and installation

Read the instructions there.

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

Enjoy it !

Changelog

CONFIGURATION

  • Do not reset CFLAGS or CXXFLAGS so one can overwrite them.

  • Now that *.mo files are automatically generated by the compiler, do not put them in the git repository.

  • Put gbh3 back into the git repository.

  • Add blurring algorithm attribution.

  • Get rid of many gcc warnings.

DEVELOPMENT ENVIRONMENT

Code editor

  • The background color of error or watch tooltips is now explicitly merged with the theme default background color.

  • The method popup font is sized according to the number of methods to display.

Code formatting

  • Format on load & save option now marks the files as modified, so that search does not become silly.

  • Format on load & save option is now taken into account by the text editor, not just by the code editor.

  • Ignores void files now.

Database editor

  • Display the duration of custom requests is the request editor.

  • The request editor now wraps its contents.

Form editor

  • The dialog for editing text property now displays the name of the editor property in its title.

Help browser

  • Opening the help browser from the welcome dialog does not crash anymore if the left panel is visible.

  • Fix the left panel contents.

Image editor

  • Do not crash when using the erase tool while pressing SHIFT key.

Option dialog

  • Support for automatic translation based on translate-shell tool.

  • Add new snippets.

  • Display custom snippets in bold.

  • Fix spacing of some options in Project tab.

Packager

  • Do not create component with a name having a leading dot anymore.

  • Fix slackware package generation.

Project properties dialog

  • Use custom icons for component tab check boxes, because some style cannot draw them correctly.

  • Add GB_NO_JIT as predefined environment variable.

  • The environment variable table now automatically resizes its columns.

Search dialog

  • Text highlight now works correctly whatever the editor font is.

  • Make it larger for long checkbox labels.

Text editor

  • Some fixes in javascript compression.

Translation dialog

  • Move the current translation related buttons to their own toolbars juste above the translation field.

  • Add two buttons to move between translated strings.

  • Support for automatic translation based on translate-shell tool.

  • Deleting a translation correctly removes it from the translation combo box.

Welcome dialog

  • Use the new icon instead of the old one.

Miscellaneous

  • Update Italian translation.

  • Update French translation.

  • Update Spanish translation.

  • Update Dutch translation.

  • Update financial support.

  • Do not call msgfmt anymore, this is automatically done by the compiler now.

  • Mark some strings in forms as not to be translated.

EXAMPLES

  • Fix corrupted image in BeastScroll example.

WIKI

  • Update French translation.

  • Support for webm video files.

  • Support for integrated playground.

  • The page title now starts with the page path.

  • Update Dutch translation.

WEBSITE MAKER

  • Update Dutch translation.

INTERPRETER

  • InStr() and RInstr() work correctly again when case is ignored and pattern length is at least two characters.

  • Add a API to know if a native component exists on the disk.

  • Fix loop optimization that didn't work on loops calling themselves recursively.

  • Take care of components that modify the environ variable. Using gb.httpd does not crash anymore.

  • Make the "./" path equivalent to "." as before, and not a prefix for a component with a null name.

  • Allow one more decimal digit in floating point number constants.

  • Ignore trailing zeros in the decimal part of floating point number constants. It may introduce rounding differences.

  • Don't crash if a component uses NULL as error message argument. Replace it by a void string.

  • Fix string to floating point conversion routine.

  • Allocate custom language environment variables statically, because environment is accessed by shared library exit routines, after the interpreter memory allocations have been freed.

  • Define a new limit constant, that is the maximum length of the System.Language variable. It is 16 bytes.

  • File.RealPath() is a new static method that returns the canonicalized absolute path name of the specified path, with no symbolic links inside.

  • String.Code() now returns -1 on incorrect UTF-8 string.

  • Array.SortUsing() is a new method that sorts an array according to the sort order defined by another array.

  • String.Right() does not crash anymore on invalid UTF-8 strings.

  • Add Sort() method to variant arrays.

  • JIT compilation is now run in two steps.

  • Active file descriptor watches and active timers are now automatically transferred to the component declaring a custom event loop. Consequently, a process started before the declaration of the event loop will have its termination signal correctly catched.

  • Use waitpid() instead of wait4().

  • Array.Shuffle() is a new method that randomly shuffles an array using Fisher–Yates algorithm.

  • JIT compiler does not run static initializers anymore when loading a class. Otherwise bytecode can be modified before being compiled, leading to a JIT compiler crash.

  • Fix Url$() escaping characters.

COMPILER

  • If the option -t is specified, the compiler now automatically calls msgfmt to compile the translation files if needed.

  • Unused function warnings now point at the beginning of the function.

  • Raise an error if there is not enough local slots for control structures.

  • ASSERT ... PRINT or ERROR allows to use PRINT or ERROR to print a message when the assertion fails.

  • Fix LOCK subroutine meta-information.

SCRIPTER

  • Scripter now compiles the content of arguments in inline mode (-e).

GB.ARGS

  • Update Italian translation.

  • Update Dutch translation.

GB.COMPLEX

  • Optimize division, thanks to Cedron Dawg.

GB.DB

  • Connection.GetTemplate() and Connection.ApplyTemplate() now take tables without primary key into account correctly.

GB.DB.FORM

  • Update Italian translation.

  • Update Dutch translation.

GB.EVAL

  • Code formatting: Unary minus operator is now sticked to its argument.

GB.EVAL.HIGHLIGHT

  • TextHighlighter: Paint() is a new method that paints the highlighted text.

GB.FORM

  • Update Italian translation.

  • Update Dutch translation.

  • ToolPanel: Does not crash anymore.

  • Spinner: Enable the spinner timer only if needed, and not permanently!

  • TimeBox is a new control that allows to enter a duration. Maybe the name of the control is not very good.

  • URLLabel: Rewrite the control as a child of Label.

  • FileView: Sometimes the contents was not correctly refreshed.

GB.FORM.DIALOG

  • Update Italian translation.

  • Update Dutch translation.

GB.FORM.EDITOR

  • TextEditor: Entering a string delimiter while text is selected correctly encloses it again.

  • TextEditor: The inner shadow now covers the margin.

GB.FORM.MDI

  • Update Italian translation.

  • Workspace: Sometimes closing a tab with the middle button is triggered twice, leading to a crash. Made a workaround.

  • Workspace: Add CloseButton property that allows to remove the global close button.

GB.FORM.STOCK

  • Fix some icons.

GB.FORM.TERMINAL

  • TerminalView: Implement ESC <N> b sequence.

  • TerminalView: the minimal screen height is now 2 lines.

GB.GTK

  • Do not propagate mouse wheel events of ComboBox, TextArea, Slider and ScrollBar, as in Qt components.

  • Window: Windows without any active child control correctly catch keyboard events now.

  • Declare the event loop hook last so that active file descriptor watches and active transfer are automatically transferred.

GB.GTK3

  • Do not propagate mouse wheel events of ComboBox, TextArea, Slider and ScrollBar, as in Qt components.

  • TabStrip: Tab labels are now correctly displayed when the tab has no icon.

  • Make component compile with GTK+ version < 3.20.

  • Window: Windows without any active child control correctly catch keyboard events now.

  • Declare the event loop hook last so that active file descriptor watches and active transfer are automatically transferred.

GB.GUI

  • Take the other requested GUI components into account to choose the toolkit.

GB.GUI.BASE

  • Paint: Add an hidden undocumented method that computes the character width of a fixed font.

  • SpinBox: Alignment is a new property that allows to define the alignment of the control inner text.

  • SpinBox: ShowZero is a new property that tells to pad the displayed number with zeros.

  • SpinBox: Limit is a new event that is raised when the user tries to move past the maximum value, or before the minimum value.

  • SpinBox: The value entered with the keyboard is now always taken into account by the next use of the mouse.

  • ScrollArea: The shadow is smoother now.

  • GridView: Make selected color less transparent.

GB.GUI.QT

  • Take the other requested GUI components into account to choose the toolkit.

GB.INOTIFY

  • Watch: Events[] incorrectly reset events outside the given event set and ignored the assigned value.

GB.JIT

  • Do not use loop initial declaration in generated C code for old gcc versions.

  • Fix the default value of optional Object function arguments.

  • Support for tcc compiler.

  • Fix Debug instruction.

  • Support for the new Assert instruction.

  • Run JIT compilation in the background.

  • JIT.Debug is a new property that allows to enable JIT debugging messages at runtime.

  • Don't display abortion debugging message if there is no compilation to abort.

  • Object variables are correctly managed now.

  • DO...LOOP and REPEAT...UNTIL at the beginning of the function now is correctly compiled in all cases.

GB.MAP

  • MapView: Map is now correctly located under the mouse cursor when zooming out.

  • Circle items now have the good radius.

  • MapPoint.Distance() is now a static public function.

  • Map.Proxy is a new property that allows to define the proxy used by all HTTP requests made to retrieve the map tiles.

  • GetShape(), GetTile(), Remove() and Exists() are new methods to manipulate Map Layers.

  • DefaultCache is a new property to set default cache path elsewhere from User's Home.

  • GetItem is a new method to manipulate shape items inside a Shape Layer.

  • GetCenter made static in MapPoint.

  • LineStyle is a new property to Shape Layer's Items.

  • Added some inline Help comments on several methods and properties.

  • Circles can now be moved by changing it's Center property.

  • Circles can now have Fill colors other than Shape's default.

  • Item's icon is now centered, if other than default.

  • Item's icon can now be colorized, if other than default.

  • Better Layer opacity handling.

  • Better ZoomOut handling.

  • Use of FAST in MapPoint class and Geo module.

GB.MEDIA

  • MediaPipeline: Pos is a new synonymous for the Position property.

  • MediaPipeline: Position is a new event that is raised when the media position has changed.

  • MediaPipeline: Seek() is a new method that allows to move the media to a specific position while specifying GStreamer seek flags.

  • MediaPipeline: Speed is a new property that allows to define the media playing speed rate. A negative speed will play backward.

  • MediaPipeline: Forward() is a new method that allows to move forward a specific amount of frames. Moving backward does not work at the moment.

  • Media: Add MediaPipeline.Seek() seek constants.

GB.MEDIA.FORM

  • MediaView: Merge the play and pause button.

  • MediaView: Remove the big white pause symbol.

  • MediaView: Speed is a new property that allows to define the media playing speed.

  • MediaView: Resizing the control while the media is paused correctly resizes the displayed frame.

GB.NET

  • UdpSocket: Fix class declaration.

  • UdpSocket: Host is a new property that allows to define the IP address the UDP socket will be bounded to.

  • SerialPort: Open() method now raises more detailed errors.

  • SerialPort: Support for any port speed on Linux.

GB.NET.CURL

  • Curl.DefaultProxy is a new property that allows to define the default proxy of all newly created HttpClient objects.

GB.NET.PO3

  • Update Dutch translation.

GB.PDF

  • Replace Guint by uint, otherwise the component seems to not compile anymore on some systems.

  • Make gb.pdf compile with poppler 0.72.

GB.REPORT

  • Update Dutch translation.

GB.REPORT2

  • Update Dutch translation.

GB.QT4

  • Declare the event loop hook last so that active file descriptor watches and active transfer are automatically transferred.

GB.QT5

  • Declare the event loop hook last so that active file descriptor watches and active transfer are automatically transferred.

GB.REPORT2

  • Update Italian translation.

  • Add the requirement for gb.eval in component information, and loads it explicitly.

GB.SDL2

  • Draw.Image() opacity argument works as expected now.

  • Font[] now assumes a default size of 10 points, so that you don't have to specify the font size when creating the Font object.

  • Don't crash when drawing one-character static strings.

GB.TERM.FORM

  • Update Dutch translation.

GB.UTIL

  • Allow to retrieve timezone from Date.FromRFC822().

  • Propagate internal errors from Date.FromRFC822() instead of shadowing them with a Catch block.

  • Improve error message from Date.GetRFC822Zone() by showing what couldn't be recognized as a timezone.

  • Add Date.FromUTC() as inverse to Date.ToUTC().

  • Fix timezone bug in Date.FromRFC822() and pass all tests.

GB.UTIL.WEB

  • URL is a now a dynamic class that can be used for analyzing and modifying the contents of an URL.

  • URLQuery is a new class that represents the query part of an URL.

GB.WEB

  • Correctly normalize SQLite session file names.

GB.WEB.FEED

  • Update Dutch translation.

  • Introduce RssDate class for date+timezone handling and update documentation.

  • RssGuid: do not set IsPermaLink by default when parsing.

  • Mark component as "Stable".

  • Depend on gb.util for RFC822 date conversions.

GB.WEB.FORM

  • Update Italian translation.

  • Update Dutch translation.

  • WebTextArea: The Text property works correctly again.

GB.XML

  • <!DOCTYPE> declaration is now case-insensitive.