Sign in Join
Wiki copytemporary

Lazarus 1.2.0 release notes: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Lazarus 1.2.0 release notes

OldNewLine
1+Lazarus 1.2.0 was released at March 2, 2014.
2+
3+Statistics:
4+
5+1. commits: 5855
6+2. log: svn log -r 36507:44302
7+3. resolved bug tracker issues: 552
8+
9+# Minor releases
10+
11+List of fixes since 1.2, including Lazarus 1.2.2: [[Lazarus 1.2 fixes branch]]
12+
13+# LCL Interfaces Changes
14+
15+- TCMMouseWheel.WheelData is renamed to WheelDelta to better describe its purpose and for Delphi compatibility.
16+- Qt: Implemented scrollable forms (TCustomForm.AutoScroll / TCustomForm.HorzScrollbar,TCustomForm.VertScrollBar).IDE must be rebuild with -dQTSCROLLABLEFORMS, or enable define QTSCROLLABLEFORMS in lcl/interfaces/qt/qtdefines.inc to use scrollable forms.
17+
18+# LCL Changes
19+
20+- TMemo.WantReturns is implemented
21+- TListView.OwnerDraw and OnDrawItem is implemented
22+- TCustomListView.SelectAll, TCustomListView.ClearSelection and TCustomListView.AddItem are implemented for Delphi compatibility.
23+
24+# IDE Changes
25+
26+- **Editor**
27+ - [[IDE Window: Editor Macros|Macro Recorder/Player]]
28+ - Multiple macros. Ability to select/change macro from list.
29+ - Individual key-shortcuts for each Macro
30+ - Macros can be saved per project or with the global IDE config
31+ - Package EditorMacroScripting: Allow use of [[Editor Macros PascalScript|PascalScript in macros]].
32+ - Sticky selection mode
33+ - Select text word-wise
34+ - Highlight different (user specified) words in different colors [[IDE Window: Editor User Defined Words|See here]]
35+ - Auto-continue for comments and strings
36+ - Inactive code in \$IFDEF can be "low-lighted" (greyed out)
37+ - Markup/Highlight colors can be merged (alpha channel) and prioritised.
38+ - Added Popup menu / Source / Find references of used unit: Position cursor on a uses clause will find all references of this used unit within the active unit.
39+- **Debugger**
40+ - Watches window: added detail view, for selected watch
41+ - Debug Inspector: Ability to directly input expression to monitor
42+ - Attach and Detach
43+ - Support for [remote debug](http://wiki.lazarus.freepascal.org/Remote_Debugging#Using_gdbserver) with gdbserver
44+- When option "open last project" is enabled (default) and the IDE was closed with no project, no project will open at start. When a virtual (not saved) project was open a new Application project is created.
45+- The [[IDE Window: Package Graph|Package Graph]] now uses the new TLvlGraphControl, showing all package dependencies including project and IDE.
46+- Package Editor: new menu item to find and remove unneeded dependencies
47+- **IDEIntf**
48+ - Added boolean parameter BringToFront (defaults to false) to TLazIDEInterface.DoShowSearchResultsView. It specifies whether Search Results dialog should be shown on top or under Source Editor. Behavior of existing code calling this method is not affected.
49+ - Added TPropertyEditor.GetVerbCount, GetVerb, PrepareItem, ExecuteVerb to let TPropertyEditors add menu items to the Object Inspector.
50+- **Compiler options**
51+ - Build modes
52+ - Build modes are not visible by default. They can be enabled with a checkbox.
53+ - The GUI is visually above the options GUI pages, thus indicating it has effect on them.
54+ - There is a separate window for managing the modes. Two useful modes, "Debug" and "Release", can be created with a single click.
55+ - GUI for all available options
56+ - Options are read and parsed directly from FPC.
57+ - The "Other" page has a button which opens the generated GUI. The options are synchronized and saved with the custom options memo.
58+ - There is another button for selecting DEFINEs. All added DEFINEs are stored in project options, the selected ones are put to custom options.
59+ - Options in other pages have been rearranged
60+ - "IDE Macro Values" was replaced with a more powerful page "[[IDE Window: Compiler Options|Additions and Overrides]]". Here are some example that you can do now, which were not possible before:
61+ - Append FPC options to packages without touching the lpk
62+ - Changing the output directory of packages without touching the lpk
63+ - Define IDE macros only for some packages or only for the project
64+ - Append compiler options for all projects with build mode "debug"
65+ - Change the package(s) output directory of all projects and packages with build mode "release"
66+ - Append compiler options of third party projects and packages without altering their sources
67+ - The page [[IDE Window: Compiler Options|Inherited]] was moved to the *Show options* dialog.
68+- The window [[IDE Window: Unit dependencies|Unit Dependencies]] was rewritten:
69+ - It shows what units a unit uses
70+ - It shows what units uses that unit
71+ - Search and filter
72+ - Showing packages and projects as graphs
73+- **Designer**
74+ - New designer popup menu item **Reset** for setting control bounds to their ancestor bounds
75+ - Add Frame onto a form: The dialog to select the frame ancestor now scans all sources.
76+- The default test directory of the IDE under Linux was changed from /tmp to ~/tmp to avoid clashes with other users
77+- Delphi converter is more robust and does not abort any more for parsing or other errors. The conversions are still primitive but they are done better.
78+
79+# lazbuild
80+
81+- Added options --verbose, --quiet and -q to increase/decrease verbosity. You can pass them multiple times.
82+- When compiling a project (.lpi) lazbuild now checks if the project needs compilation and if not will not call the compiler. It also now writes why it recompiles.
83+
84+# Components
85+
86+## TAChart
87+
88+- Series:
89+ - Transparency
90+ - `AddArray`, `AddNull`, `AddX` and `AddY` functions, `SetText` procedure
91+ - `TFitSeries.IEquationText` interface
92+ - `TPolarSeries.CloseCircle` property
93+ - `TFuncSeries.ExtentAutoY` property
94+ - `TBarSeries.GetBarWidth` function
95+- Tools:
96+ - New tool: `TDataPointDistanceTool`
97+ - `EscapeCancels` property for dragging tools
98+ - `TDataPointHintTool`: `UseApplicationHint` property, `OnHintPosition` event
99+ - `TDataPointFragTool`: `Origin` property, `OnDrag`, `OnStartDrag` events
100+ - `TZoomDragTool.RestoreExtentOn` property
101+ - `TChartToolset.DispatchedShiftState` property
102+- Sources:
103+ - `TDbChartSource`: `Options=[dcsoDateTimeX, dcsoDateTimeY]` property, `OnGetItem` event
104+ - `TListChartSource`: `SetText`, `SetColor`, `AddXYList` procedures
105+ - New sources: `TCustomAnimatedChartSource`, `TCustomAxisChartSource`
106+- Axes and marks:
107+ - Axis index property editor
108+ - `TChartAxis`: `Position`, `Value`, `ValueCount` properties, `IsPointInside` function
109+ - Marks: `Arrow`, `Margins`, `Shape`, `CalloutAngle` properties, `OnGetShape` event
110+- Misc
111+ - `TAChartTeeChart` unit with some helpers for migration from TeeChart
112+ - `TChart`: `IsZoomed`, `PrevLogicalExtent`, `AutoFocus` properties
113+ - `TChartExtentHistory` utility class
114+ - 3 new demos: `lazreport`, `animate`, `distance`
115+
116+## TActiveX/LazActivex
117+
118+New package.
119+
120+The LazActiveX package contains the TActiveXContainer component and the IDE integration of the necessary tools to create ActiveX components from a type library or directly from the object (exe or dll). ActiveX is a Microsoft Windows technology and can only be used on that platform. Cross compilation to windows is possible but the typelib importer used to create the COM bindings works only on Windows (wine not tested).
121+
122+See [[LazActiveX]]
123+
124+## TDBImage
125+
126+Delphi compatible behaviour can now be set.
127+
128+Lazarus TDBImage by default saves information about the file type before the image data. This allows seamless use of various file formats (.jpg, .bmp,...). Delphi does not save information about the file type.
129+
130+To allow programmers to use TDBImage more flexibly, including supporting Delphi compatibility, two events to TDBImage were added:
131+
132+``` pascal
133+TOnDBImageRead = procedure(Sender: TObject; S: TStream; var GraphExt : string) of object;
134+TOnDBImageWrite = procedure(Sender: TObject; S: TStream; GraphExt : string) of object;
135+```
136+
137+If the first event is defined then it is called instead of TDBImage reading from the stream and must return the file extension as GraphExt. For example:
138+
139+``` pascal
140+procedure TMyForm.TDBImageDBImageRead(Sender: TObject; S: TStream;
141+ var GraphExt: string);
142+begin
143+ GraphExt := 'jpg';
144+end;
145+```
146+
147+can be used when the type of the image is always JPEG.
148+
149+Similarly, if OnDBImageWrite is present then this is called instead of TDBImage writing the file extension to the start of the BLOB in the database. For example:
150+
151+``` pascal
152+procedure TMyForm.PhotoDBImageWrite(Sender: TObject;
153+ S: TStream; GraphExt: string);
154+begin
155+ if GraphExt <> 'jpg' then
156+ raise Exception.Create('Can only save a JPEG Image');
157+end;
158+```
159+
160+also works for an implicit JPEG.
161+
162+## TFBAdmin
163+
164+This database component allows you to perform administrative actions such as:
165+
166+- add, modify or delete database users
167+- backup and restore databases using single or multiple (split) files
168+- get general database information
169+- get the database log file listing important database events and errors
170+
171+for your Firebird (and probably Interbase) database. It works independently from **TIBConnection**.
172+
173+Please see [[Firebird|Firebird#Database_Administration]] and the example program included with Lazarus for more information.
174+
175+As this is a thin wrapper over the FPC **TFBAdmin** component, please also see FPC documentation and examples for further details.
176+
177+## TFBEventMonitor
178+
179+This database component allows you to get notified of Firebird (Interbase) events - generated from within the database by triggers. This is useful to reduce the frequency of polling/getting information from the database via your code.
180+
181+Please see [[Firebird|Firebird#Monitoring_Events]] and the example program included with Lazarus for more information.
182+
183+As this is a thin wrapper over the FPC **TFBEventMonitor** component, please also see FPC documentation and examples for further details.
184+
185+## TLvlGraphControl
186+
187+This new control is part of the package LazControls and used by the IDE itself as well. The control shows a graph consisting of nodes and edges as a level graph (this type of graph is also called a layered graph).
188+
189+<figure>
190+<img src="packagegraph1.png" title="packagegraph1.png" />
191+<figcaption>packagegraph1.png</figcaption>
192+</figure>
193+
194+TLvlGraphControl Features
195+
196+- Offers automatic topological sorting, with an option to put nodes leftmost or rightmost
197+- You can automatically combine edges. Long edges over multiple levels are combined into single lines with forks.
198+- Provides a heuristic to minimize line crossings
199+- Automatically prevents overlapping of display elements
200+- Nodes can be displayed as rectangles, ellipses or icons stored in a TImageList
201+- You can select nodes using the mouse
202+- You can select multiple nodes at once
203+- You can highlight nodes or edges under the mouse
204+- The control displays back edges in special colours, which facilitates quick visual identification of cycles (e.g. unit circles).
205+- Edges can be drawn straight or curved (bezier)
206+- There is a header caption
207+- Node captions can be shown to the left, to the right, above or below nodes
208+- All colors can be set via published properties
209+- There are events provided to custom-draw and/or skip each part of the default drawing
210+
211+There is a simple example in examples/levelgraph/lvlgraph_dependencies.lpi.
212+
213+<figure>
214+<img src="unitdependencies1.png" title="unitdependencies1.png" />
215+<figcaption>unitdependencies1.png</figcaption>
216+</figure>
217+
218+## TPQTEventMonitor
219+
220+This database component allows you to get notified of PostgreSQL events - generated from within the database. This is useful to reduce the frequency of polling/getting information from the database via your code.
221+
222+As this is a thin wrapper over the FPC **TFBEventMonitor** component, please also see FPC documentation and example programs (e.g. pqeventstest.pp) for details.
223+
224+## TSQLDBLibraryLoader
225+
226+This database component allows you to specify the exact client library filename to load for your SQLDB connection in the **LibraryName** property. This component is useful if your environment has non-standard client library names.
227+
228+You should set the library filename before enabling the TSQLConnection.
229+
230+As this is a thin wripper over the FPC **TSQLDBLibraryLoader** component, please see FPC documentation for further details. For now, see e.g. [[TSQLDBLibraryLoader]]
231+
232+## TTIPropertyGrid,TTICustomPropertyGrid
233+
234+Added event **OnEditorFilter** to let user define what properties to show.
235+
236+## Command line utility to create closed source packages
237+
238+The command line utility can be compiled with:
239+
240+`components/codetools/examples/sourcecloser.lpi`
241+
242+It can remove implementations from Pascal units and can change lpk files to compile only manually and adds -Ur to the compiler options. Start it with -h to see all options.
243+
244+# Changes affecting compatibility
245+
246+## LCL incompatibilities
247+
248+### LCLType INVALID_HANDLE_VALUE now Handle(-1)
249+
250+- Old value: LCLType.Handle(0)
251+- New value: LCLType.Handle(-1)
252+- Effect: ported code from Delphi now works right, code that misused the constant now works wrong
253+- Reason: This constant is a WinAPI constant and used for Windows functions like FileOpen and FileCreate as return value on failure. The cross-plaform FCL functions with the same name return the same value on failure. LCL didn't use this constant itself. It is defined in LCL to make porting Delphi code easier.
254+- Remedy: Check your code if the INVALID_HANDLE_VALUE are from unit LCLType or from unit Windows. If the former, then check the code logic.
255+
256+### LCL WidgetSet Classes (wslclclasses unit)
257+
258+- Old behaviour: VIRTUAL_VMT_COUNT const value was 100
259+- New behaviour: VIRTUAL_VMT_COUNT const value increased to 128
260+- Reason: Ability to add more methods to ws classes (eg. selectAll in TWSCustomListView), without increasing VIRTUAL_VMT_COUNT lcl crashes.
261+- Remedy: unknown
262+
263+### LCL TCustomForm.AddHandlerFirstShow,AddHandlerClose,AddHandlerCreate parameter AsFirst default value changed to false
264+
265+- Effect: old code might now be called after other handlers.
266+- Reason: Consistency with other LCL AddHandler.
267+- Remedy: If your event needs to be called earlier add parameter **true** to call.
268+
269+### LCL TScreen.AddHandlerFormAdded, AddHandlerRemoveForm, AddHandlerActiveControlChanged, AddHandlerActiveFormChanged, AddHandlerFormVisibleChanged parameter AsFirst default value changed to false
270+
271+- Effect: old code might now be called after other handlers.
272+- Reason: Consistency with other LCL AddHandler.
273+- Remedy: If your event needs to be called earlier add parameter **true** to call.
274+
275+### LCL TAction.OnExecute no longer sets TControl/TMenuItem.OnClick
276+
277+- Old behavior: When setting Action.OnExecute all associated OnClick events of TControl and TMenuItem were set as well. The OnClicks were not saved to lfm.
278+- New behavior: When setting Action.OnExecute no other event is set. On click first the OnClick and then the Action.OnExecute is called.
279+- Effect: Code that checks if OnClick is assigned instead of the Action.OnExecute fails.
280+- Reason: Allow to set separate OnClick and OnExecute events, consistency between lfm and Object Inspector.
281+- Remedy: Check logic of all lines containing "Assigned(OnClick)".
282+
283+Double clicking on a component with an Action will now automatically use the Action.OnExecute event. That means the IDE will create the event if needed and jump to implementation in the Source Editor.
284+
285+### LCL TTreeView with Images no longer indents nodes without image
286+
287+- Old behaviour: When the Images of a TTreeView was set, all nodes without ImageIndex were still painted indented as if they had images
288+- New behavior: Nodes without a valid ImageIndex are not indented
289+- Effect: Custom drawn TreeView may now paint at wrong place
290+- Reason: The empty space looked like a bug
291+- Remedy: Adapt your custom drawn code. Or set an ImageIndex and set the PaintImages parameter to false. Then the nodes are indented, but the icons are not painted.
292+
293+### TBitBtn.Spacing default changed
294+
295+- Effect: default Spacing is changed from 3 to 4 px
296+- Reason: Delphi compatibility
297+- Remedy: TBitBtn look
298+
299+### LazUtils CreateRelativePath behaviour changed
300+
301+- Old behaviour: if a relative path could be constructed, this was sometimes appended with a pathdelimiter, and sometimes not.
302+- New behaviour: no pathdelimiter is appended.
303+
304+### LazUtils TrimFilename behaviour changed
305+
306+- Old behaviour: TrimFilename on Windows changed all '/' into '\\' and removed double PathDelimiters.
307+- New behaviour: If a filename starts with '\\\\?\\' (Extended Length naming scheme to allow for filenames \> MAXPATH characters), then the filename will not be altered. (Since the code that does this has been moved to the ResolveDots function it affects o.a. ExpandFilenameUTF8)
308+- Reason: [MS specifications on filenames](http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx)
309+
310+### LazFileUtils / FileUtil handling of pathdelimiters
311+
312+- Old behaviour: several functions only handled PathDelim.
313+- New behaviour: these functions now use AllowDirectorySeparators. This affects a.o. FindDiskFilename, FindDiskFileNaecaseInsensitive, ExtractFileNameWithoutExt, TryCreateRelativePath, ForceDirectory, FilenameIsTrimmed, AppendPathDelim, ChompPathDelim, MinimizeSearchPath, FindPathInSearchPath, ForceDirectoriesUTF8, ExtractFileRoot, IsUNCPath, ExtractUNCVolume, FilenameIsWinAbsolute, ResolveDots, TrimFileName, ExpandFilenameUtf8.
314+- Reason: compatibility with FreePascal RTL handling of pathdelimiters.
315+- Remedy: two new functions were added to LazFileUtils (ForcePathDelims and GetForcedPathDelims) that change all '\\' into '/' (or vice versa, depending on OS) regardless of AllowDirectorySeparators.
316+
317+### LCLType: fixed typo in constant declaration
318+
319+- Old behaviour: one of the MB_XXXX constants was wrongly named MB_ICONASTERICK
320+- New behaviour: the constant now is named MB_ICONASTERISK
321+- Reason: Compliance with MS standards, Delphi compatibility
322+- Remedy: Use MB_ICONASTERISK instead of MB_ICONASTERICK in calling code (it is used as a parameter in Windows.MessageBox function)
323+
324+### Since 1.2.4: TControlScrollBar.AutoCalcRange was removed
325+
326+- This incompatibility was introduced in 1.2.4 to fix a design flaw.
327+- Effect: compiler error: There is no method in an ancestor class to be overridden: "TYourControlScrollBar.AutoCalcRange;"
328+- Reason: Code for calculating the *AutoScroll* ranges was moved from the two scrollbars to the new proteced method TScrollingWinControl.CalculateAutoRanges. This prevents an endless loop when the two scrollbars depend on each other.
329+- Remedy: Override TYourControl.CalculateAutoRanges instead.
330+
331+## IDE incompatibilities
332+
333+### AllowDirectorySeparators no longer contains backslash under Unix
334+
335+- Effect: Functions ExtractFileName, ExtractFilePath, ExtractFileDir no longer treats backslashes as separator. Functions DoDirSeparators and SetDirSeparators no longer changes backslashes in file names to slashes. This affects only IDE plugins, **not** LCL applications in general.
336+- Reason: Backslash is a valid character in Unix file names.
337+- Remedy: If you need to change slashes and backslashes to the default path delimiter, use the functions ForcePathDelims and GetForcedPathDelims from unit LazFileUtils.
338+
339+### IDEIntf TOICustomPropertyGrid.Favourites was renamed to Favorites
340+
341+- Effect: old code might fail to compile
342+- Reason: Consistent American spelling
343+- Remedy: Rename used identifier
344+
345+### Global SrcPath was removed
346+
347+The Option *Tools / Options / CodeTools / General / Additional sources* was removed.
348+
349+- Effect: IDE can not find an unit, while compiler can
350+- Reason: This option was added as workaround for various shortcomings of the IDE and was often confused. For example the IDE was not able to find pas/pp files in the unit paths defined by the fpc.cfg. The IDE can now find such files and has now some options to setup source paths globally.
351+- Remedy: Add the path to *Project Options / Paths / Other Sources* or to the *Additions and Overrides*.
352+
353+## Other release notes
354+
355+---
356+*From the Free Pascal wiki, page "Lazarus 1.2.0 release notes", as it stood on 2020-02-18 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
357+Category: Lazarus
358+Category: Release Notes

Back to history