Lazarus 0.9.26 release notes
- commits: 3973 in trunk + xxx in the fixes branch
- log: svn log -r 12751:16724 (+ log of http://svn.freepascal.org/svn/lazarus/tags/lazarus_0_9_26)
- resolved bug tracker issues: 703 (according to mantis)
LCL Interfaces major changes
- Lazarus 0.9.24: Encoding used for strings in the LCL is ansi
- Lazarus 0.9.26: Encoding used for strings in the LCL is UTF8
LCL major changes
- new properties TForm.LCLVersion and TFrame.LCLVersion
Every form and frame now saves this property adding version information to the lfm file. This version information can now be used by the IDE to automatically adapt the lfm before loading. This means: If a property is renamed, deleted or its type changed, rules can be added to convert the properties automatically. If an old IDE 0.9.24 opens a lfm of a 0.9.26+ you will get the TReader error, that the property LCLVersion does not exist. Press 'stop loading this resource' and the lfm repair wizard opens. Confirm to remove the unknown properties to load the new form. Or you can use Search / Find in Files' and remove in all .lfm files the LCLVersion: Set Text to find to LCLVersion .*, enable regular expression, where: search in files in project or in directories, set file mask to *.lfm, check replace and set replace text empty then click ok.
- Win32 widgetset and LCL in general are adopted to support only utf8 strings. Whatever you do with strings returned and passed from/to controls please know they are in utf8 encoding now.
- UTF8KeyPress is published to let you work with national characters without their conversion to 1 byte encoding.
- SelStart, SelLength are changed to return values in characters, not in bytes. This is correspond to visual control representation. Thus if worked previously with SelStart and SelLength then search your projects and replace ansi string operations with utf8 analogs. For example you need to replace Copy with UTF8Copy, etc.
- FileUtil routines are changed and new added to work with utf8 file and directory names.
- Some useful string operations (UTF8Copy, UTF8UpperCase, UTF8LowerCase to name a few) are added to the LCLProc unit.
- See here more details, tipps and tricks LCL Unicode Support.
- added new basic class TRasterImage which is ancestor of TCustomBitmap and TCustomIcon. TCustomBitmap is an ancestor of All graphics which has one image. TCustomIcon is an ancestor of TIcon, TCursorImage and TIncsIcon (new class).
- graphics which loaded from a file or resource represented internally in the origianl format (depth, component order, etc). And only when OS handles needs to be created it converts to supported desktop format (but this doesnot change internal representation).
- Masking has been totaly fixed. TCustomBitmap.Transparent, TCustomBitmap.TransparentColor, TCustomBitmap.TransparentMode are now delphi compatible and works.
- TIcon can create HICON handle and thus we can finally use it to set Form.Icon and Application.Icon
- New TIcnsIcon class allows to read Mac OSX icon resource files (like windows .ico files but for OSX)
- TImage has been fixed and now shows transparent backgound for transparent graphics (png with alpha, icon)
- TImageList got an ability to draw an image in 5 states: normal, highlighted, shadowed, disabled and black-white (more info here: http://lazarus-dev.blogspot.com/2008/05/new-0926-features-part-2-imagelist.html).
- Greatly improved Carbon widgetset. IDE is now using carbon by default.
- Greatly improved WinCE widgetset. The last version was Ansi based, this new one supports only UTF-8. Many fixes to modal forms and application type. Implemented message dialogs. Fixed colors of controls and improved menus. Shows popup menus from mouse gestures.
- Greatly improved Qt widgetset. IDE is working and you can use the form designer. Though under windows it works a bit unstable.
- Win32, Gtk2 widgetsets are improved too.
- ButtonGlyphs now use an internal imagelist to store glyphs and to draw them in different states (this is visible with SpeedButton and BitBtn)
- SendMessage and PostMessage were implemented for our main widgetsets only for LM_USER messages (more info here: http://lazarus-dev.blogspot.com/2008/01/new-0926-features-part-1-sendmessage.html)
- Form.Icon and Application.Icon are finally working for most of widgetsets.
- LCL now uses FPC's cwstrings unit on unix (e.g. Linux, BSD, Mac OS X). This allows to handle systems, where the default language encoding is not UTF-8. The drawback is, that it links to the iconv library. So compiling on a new system and installing on an old system will give an incompatible iconv version. Workaround: Use 0.9.27 and compile lazarus with -dDisableIconv OR improve FPC's unit iconvenc to load iconv lib dynamically.
- added ssMeta, scMeta to Shortcuts, carbon: Cmd now sets ssMeta, Ctrl now sets ssCtrl, Alt now sets ssAlt
LCL minor changes
- TComboBox.OnChange is no longer fired when user selects an item in the popup box. Reason: Delphi compatiblity. Solution: Connect OnSelect or OnEditingDone event.
- Added TComboBox.OnGetItems. This event is fired when the combobox needs the items. The DropDown event can not be used reliable on all platforms to update the Items.
- ParentFont property is equal to True by default. Reason: Delphi compatibility.
- TForm.TextHeight property does not exits anymore and thus can show an ide error dialog on opening old projects.
- intfbasewinapi: DrawText - allow to draw only part of last bottom line
- graphics: implemented TPicture saving to different format
- New icons
- TPropertyEditorHook.GetMethodName now returns an ansistring, instead of a shortstring. AddHandlerGetMethods and RemoveHandlerMethodExists now need ansistring instead of shortstring.
- Designed Forms can now reference each other. For example a form can reference the database component on a TDataModule. Formerly you could only do it in code. For more details see here.
- IDE can now open text/source files in other encodings. It tries to guess the encoding and automatically converts them internally to UTF-8. You can change the encoding or via the new menu items of the source editor: popup menu / File Settings / Encoding.
- IDE tool for UTF-conversion: Tools / convert encoding of project/package
- Compiler Options Tests now checks for more common misconfigurations. If you got the infamous error 'unit not found', try this first.
- Compiler Options: Obsolete flags -Sp -S2 -St -So were replaced by a combobox for the -M switch. Mode FPC and MacPas were added.
- Improved Identifier completion (Ctrl+Space) adding semicolons, brackets, assignment operator
- Showing line numbers in source editor is now on by default
- TSynPasSyn.NestedComments is now set automatically by CompilerMode, for example CompilerMode:=pcmObjFPC. The highlighter now reads the $mode directive and switches the CompilerMode and NestedComments properties automatically. This way Delphi and FreePascal code is now automatically highlighted.
- Sqldb, show strings editor for SQL properties in case database connection do not support metadata extraction
- tachart: published TChart.Anchors
- windows installers: don't add debug info to fpc units
- Under Mac OS X the lazarus dmg no longer uses gtk1, but the native carbon widgetset. The IDE starter is installed under Applications. Lazarus files are installed under /Developer/lazarus. lazbuild is installed under /usr/local/bin/lazbuild. Under 10.4 the starter does not work on some systems. On these systems You can start the IDE with /Developer/lazarus/startlazarus.
- FPC source directory can now use IDE macros, like the new FPCVer, so that switching the compiler automatically switches the source directory.
- lazbuild: Can now build the IDE with the parameter --build-ide=. You can build the IDE with parameters: ./lazbuild --build-ide=-gh. The installed packages will be rebuilt if needed.
- images: add powered by lazarus image from Laurent: images/powered_by.png, images/powered-by.svg
- lazreport: many fixes and small improvements