Lazarus 1.10.0 release notes
From Free Pascal wiki
Lazarus 1.10.0 is not yet released. This page is under construction!
- commits: xxx
- log: svn log -r xxxx:xxxx
- resolved bug tracker issues: xxx
- 1 LCL Interfaces Changes
- 2 LCL Changes
- 3 IDE Changes
- 4 IDE Interfaces Changes
- 5 Components
- 6 Changes affecting compatibility
- 6.1 LazUtils
- 6.2 LCL incompatibilities
- 6.2.1 TToolBar children ignore Align
- 6.2.2 TCustomComboBox.ReadOnly was deprecated
- 6.2.3 Predefined clipboard format pcfDelphiBitmap was removed
- 6.2.4 TEdit.Action visibility lowered to public
- 6.2.5 TControl.ScaleFontsPPI, .DoScaleFontPPI parameter change
- 6.2.6 MouseEntered deprecated/missing
- 6.2.7 TCustomImageList.Add method
- 6.2.8 TCustomTreeView.OnChanging event: Node parameter
- 6.2.9 No LCL Application exception dump
- 6.2.10 No default LazLogger
- 6.2.11 Screenshot for LCLExceptionStackTrace and LazLogger Additions and Overrides
- 6.3 Components incompatibilities
- 6.4 IDE incompatibilities
- 7 Previous release notes
LCL Interfaces Changes
- ScreenToClient and ClientToScreen are now calculated without scrollbar offset. Done for Delphi compatibility.
Added flags to exclude some graphics format to create smaller applications:
TCustomImageList / TImageList
- the image list now supports multiple resolutions of one image. See Multiple-resolution TImageList in Lazarus 1.9 and newer for more details. As a result all LCL controls support High-DPI glyphs on Windows+Linux and Retina on Mac without any additional code.
- every LCL control that supports ImageList has now a new [Images]Width property to decide what custom width at 96 PPI (100% scale) is to be used. Example: TToolBar.Images/ImageWidth, TListView.LargeImages/LargeImagesWidth
- set the TCustomImageList.Scaled=True property to let the image list automatically pick up the right resolution for your control.
- New properties Images, ImageIndex and ImageWidth. With them full ImageList support was added.
- no need to save the same Glyph in LFM all over the application
- automatic high-DPI image handling
TWinControl.DoubleBuffered, .ParentDoubleBuffered and TApplication.DoubleBuffered
- Note: DoubleBuffered is a LCLWin32-only feature
- Old behavior: DoubleBuffered wasn't properly implemented and it was forced True
- New behavior:
- A Delphi-compatible DoubleBuffered/ParentDoubleBuffered concept was created (it is equal to the Font/ParentFont concept).
- The LCL has the TApplication.DoubleBuffered extension over Delphi that allows you to set form's default DoubleBuffered value globally for the whole application (set Application.DoubleBuffered before creating the first form). The value is then applied to all controls on the form with ParentDoubleBuffered:=True.
- DoubleBuffered is True by default unless in remote session (this is different to Delphi where DoubleBuffered is False by default).
- If you need one specific control to be DoubleBuffered:=False even for Application.DoubleBuffered:=adbDefault, make sure you set control.DoubleBuffered:=False and .ParentDoubleBuffered:=False.
- several High-DPI IDE improvements and retina support on Cocoa
- Delphi Attributes: Find declaration, parameter hints, $modeswitch prefixedattributes.
- The IDE parses the custom compiler options for the fpc switch -FN<namespaces>.
- pas2js support:
- Added IDE package pas2jsdsgn:
- create a browser or nodejs webapplication
- on Run start the webapp in your webbrowser
- pas2js settings are automatically fetched, same as fpc settings
- quickfixes work with pas2js messages
- Added IDE package pas2jsdsgn:
- added quickfix for fpc message "inherited method is hidden": add modifier override, overload, or reintroduce
- added designer menu item to hide icons for components like TOpenDialog. Option: Show non visual components
- extended filter for the identifier completion window - include identifiers containing prefix. (Settings: IDE Options -> Codetools -> Identifier Completion -> Sorting -> Include identifiers containing prefix.) See https://bugs.freepascal.org/view.php?id=32974.
- the identifier completion window includes also text (words) from the currently opened units. It can be disabled or set-up in IDE Options -> Codetools -> Identifier Completion -> Include words
- Added new "smart move cursor" moving commands to editor mappings. They introduce word jumping positions both at word starts and ends. They are useful as alternative Ctrl+Left/+Right/+Shift+Left/+Shift+Right key
- Added Goto/Toggle bookmark submenu to toolbar.
- Ctrl-b pops up "goto bookmark" list, with location for each bookmark. Ctrl-Shift-b pops up "toggle bookmark" list.
- Sublime like handling of selection with right/left navigation keys. Remove selection and keep caret at ex-boundary of selection. To activate check both: "Caret skips selection" and "Caret left/rigt clears selection (no move)". See mantis 26477
- Alpha: LLDB based debugger for MacOs (no code-signing required)
- Alpha: LLDB + FpDebug based debugger for MacOs (no code-signing required)
- GDB Debugger: new options:
- Added option "FixStackFrameForFpcAssert" to workaround fpc wrong frame pointer (display correct line after assert failed)
- Added option "AssemblerStyle": ATT vs Intel
- Added option "DisableStartupShell": Required on MacOs.
- Added more size limits for data evaluation (avoid errors, timeouts and extremely slow responses)
- MaxDisplayLengthForStaticArray: Similar to existing "MaxDisplayLengthForString". This should apply to static array, but it is up to gdb which types it applies it to.
- MaxLocalsLengthForStaticArray: The same, but applied while getting values for the locals window, and the function parameters show in the stack window. Should be more restrictive.
- GdbValueMemLimit: For all types. Do not evaluate values, if gdb would need more memory. Setting this to big may crash gdb. Big values may also lead to slow response times (several minutes during which the IDE would be blocked)
- GdbLocalsValueMemLimit: For locals and stack.
- DebugServer: Added "target-download" if remote supports it.
- Auto closing of the asm window, if it was opened by breaking at a none source line. https://bugs.freepascal.org/view.php?id=27800#c109463
- Dragging selected identifier from source editor to watches window, to create a watch
IDE Interfaces Changes
- added FormEditingHook.SaveComponentAsPascal, which stores a designer form as Pascal statements using TCompWriterPas. You have various options to define the format and it tells you what units are needed for the Pascal code. There is an example adding a designer menu item to copy the Pascal statements to the clipboard examples/pascalstream/CopyAsPasPkg/copyaspasdemounit1.pas.
- New property Options of type set, currently with ocoMacRetinaMode as the only member. If set, ocoMacRetinaMode determines that the OpenGL controls will use retina support (high resolution mode).
- The new TExpressionSeries and TExpressionColorMapSeries plot mathematical functions at design-time.
- TLineSeries has a new property "ColorEach" which can be used to color the line segments individually.
- TCubicSplineSeries has a new property "SplineType" which allows to select between the "natural" and the "monotone Hermite" splines (the latter avoiding overshoot of the interpolation).
Changes affecting compatibility
TToolBar children ignore Align
Controls placed within TToolBar cannot be aligned with the Align property.
- Old behavior: The Align property of TToolBar children was taken into account.
- New behavior: The Align property is ignored.
- Reason: It caused endless alignment loops when the control's size was changed by code in Create.
- Remedy: use a parent container for TToolBar and align the controls within this container.
TCustomComboBox.ReadOnly was deprecated
- Old behavior: When True, only items from the list are accepted, by direct selection from the list or AutoComplete.
- New behavior: it does nothing and will be removed.
- Reason: Delphi-compatibility, confusing naming, WS compatibility (different behavior on Win32/Qt/Gtk)
- Remedy: Use extended styles for the same feature.
Predefined clipboard format pcfDelphiBitmap was removed
- Old behavior: The enumeration TPredefineClipboardFormat contained an element pcfDelphiBitmap which once had to be introduced due to streaming differences of bitmaps between Delphi and LCL.
- New behavior: pcfDelphiBitmap has been removed. (Rare) code relying on exact count and position of the elements of this enumeration will fail.
- Reason: No longer needed and causing trouble in clipboard access.
- Remedy: None - revisit your code.
TEdit.Action visibility lowered to public
- Old behavior: TEdit.Action was published
- New behavior: TEdit.Action is now public
- Reason: Delphi compatibility
- Remedy: remove from .lfm manually
TControl.ScaleFontsPPI, .DoScaleFontPPI parameter change
- Old behavior: No AToPPI parameter
- New behavior: AToPPI parameter was added
- Reason: font scaling problem Issue #32882. This change will be merged to 1.8.1
- Remedy: fix parameters
- Old behavior: No warning on using MouseEntered
- New behavior: Warning: Symbol "MouseEntered" is deprecated: "use MouseInClient instead"
- Reason: Delphi compatibility
- Remedy: use property MouseInClient instead
- Old behavior: the image got sliced if too big or extended if too small.
- New behavior: the image is scaled to all resolutions in the image list.
- Reason: Image List now supports multiple resolutions.
- Remedy: use AddSliced (if the image consists of several icons to be added) or AddSlice (if one image from a custom rect has to be added - also rect outside the image is supported).
TCustomTreeView.OnChanging event: Node parameter
- Old behvior: The parameter Node passed to the OnChanging event points to the currently selected node. This is not compatible with Delphi which has the destination node here.
- New behavior: The parameter Node passed to the OnChanging event is the node which will be the selected node after the node-changing operation has completed.
- The operation can be aborted by setting "AllowChange" to false. For this decision, knowledge of the node going to be selected is helpfull, at least more helpful than knowledge of the node to be left which still can be accessed as TreeView.Selected at this point. The old behavior does not tell the new node.
- The new behavior is compatible with Delphi
- Remedy: If old OnChanging handlers refere to the parameter Node replace Node by TreeView.Selected.
No LCL Application exception dump
- Old behavior: In case of an exception a dump was automatically written with DebugLn (e.g. to a console).
- New behavior: There is no automatic exception dump any more.
- Reason: The LCL should not emit debugging info by default.
- Remedy 1: Add the LCLExceptionStackTrace unit to the uses clause of any of your units.
- Remedy 2: To enable LCLExceptionStacktrace globally for all projects, create a new "Additions and Overrides" entry in "Stored in IDE" for "#project" target with the contents "-FaLCLExceptionStacktrace" (see screenshot below).
No default LazLogger
- Old behavior: LazLogger was registered by default by the LCL.
- New behavior: LazLogger is not registered any more, so there is an empty logger (LazLoggerBase) used with no output.
- Reason: The LCL should not register any logger by default - the user has to define if he wants to use the logger and what logger he wants to use.
- Remedy 1: Add the LazLogger unit to the uses clause of any of your units.
- Remedy 2: To enable LazLogger globally for all projects, create a new "Additions and Overrides" entry in "Stored in IDE" for "#project" target with the contents "-FaLCLExceptionStacktrace" (see screenshot below).
Screenshot for LCLExceptionStackTrace and LazLogger Additions and Overrides
LazControls: TSpinEditEx no longer inherits from TCustomFloatSpinEditEx
- Old behavior: TSpinEditEx inherited from TFloatSpinEditEx.
- New behavior: Both TSpinEditEx and TFloatSpinEditEx now inherit from a common (generic) base class: TSpinEditExBase. As a result testing for "is TCustomFloatSpinEdit" now returns False.
- Reason: support for Int64 values in TSpinEdit (Double does not have enough precision to cover the Int64 range). Also makes for cleaner code.
- Remedy: test for the appropriate (base) class instead.
- Old behavior: The reticule could be used to display a crosshair cursor in the chart.
- New behavior: The reticule will be removed because the crosshair cursor is included in the more versatile charttools.
- Reason: Remove duplicate features.
- Remedy: Attach a TChartToolset to the chart, add a DatapointCrosshairTool to the toolset and adjust its properties.
TAChart events On[After|Before]Draw[Background|BackwallWall] deprecated
- Old behavior: These events could be used for custom-painting of the chart background or the chart data rectangle background.
- New behavior: These events will be removed.
- Reason: The events have a parameter Canvas to paint on. TAChart, however, supports additional drawing backends which do not have a canvas.
- Remedy: Use the new events On[After|Before]CustomDraw[Background|Backwall] which get the currenty used drawer as a parameter. For drawing use the corresponding drawer methods.
TAChart: The TCubicSplineOption
csoDrawFewPoints is removed.
- Old behavior: The CubicSplineSeries required at least 4 data points for drawing. In case of a TCubicSplineSeries with less data points a polygon was drawn as a replacement using the
BadDataPenif the option
csoDrawFewDataPointswas active; if this option was not set the series was not drawn at all.
- New behavior: After fixing the cubic spline interpolation in a local version if NumLib's ipf unit it is possible to draw splines also for less than 4 data points. Old code using the
csoDrawFewDatapointsoption will not compile any more.
- Reason: The old behavior was a workaround for a NumLib bug.
- Remedy: Don't use