Sign in Join
Wiki copytemporary

Lazarus 1.2.0 release notes: what changed

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

OldNewLine
11Lazarus 1.2.0 was released at March 2, 2014.
22
33Statistics:
44
551. commits: 5855
662. log: svn log -r 36507:44302
773. resolved bug tracker issues: 552
88
99# Minor releases
1010
1111List of fixes since 1.2, including Lazarus 1.2.2: [[Lazarus 1.2 fixes branch]]
1212
1313# LCL Interfaces Changes
1414
1515- TCMMouseWheel.WheelData is renamed to WheelDelta to better describe its purpose and for Delphi compatibility.
1616- 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.
1717
1818# LCL Changes
1919
2020- TMemo.WantReturns is implemented
2121- TListView.OwnerDraw and OnDrawItem is implemented
2222- TCustomListView.SelectAll, TCustomListView.ClearSelection and TCustomListView.AddItem are implemented for Delphi compatibility.
2323
2424# IDE Changes
2525
2626- **Editor**
2727 - [[IDE Window: Editor Macros|Macro Recorder/Player]]
2828 - Multiple macros. Ability to select/change macro from list.
2929 - Individual key-shortcuts for each Macro
3030 - Macros can be saved per project or with the global IDE config
3131 - Package EditorMacroScripting: Allow use of [[Editor Macros PascalScript|PascalScript in macros]].
3232 - Sticky selection mode
3333 - Select text word-wise
3434 - Highlight different (user specified) words in different colors [[IDE Window: Editor User Defined Words|See here]]
3535 - Auto-continue for comments and strings
3636 - Inactive code in \$IFDEF can be "low-lighted" (greyed out)
3737 - Markup/Highlight colors can be merged (alpha channel) and prioritised.
3838 - 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.
3939- **Debugger**
4040 - Watches window: added detail view, for selected watch
4141 - Debug Inspector: Ability to directly input expression to monitor
4242 - Attach and Detach
4343 - Support for [remote debug](http://wiki.lazarus.freepascal.org/Remote_Debugging#Using_gdbserver) with gdbserver
4444- 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.
4545- The [[IDE Window: Package Graph|Package Graph]] now uses the new TLvlGraphControl, showing all package dependencies including project and IDE.
4646- Package Editor: new menu item to find and remove unneeded dependencies
4747- **IDEIntf**
4848 - 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.
4949 - Added TPropertyEditor.GetVerbCount, GetVerb, PrepareItem, ExecuteVerb to let TPropertyEditors add menu items to the Object Inspector.
5050- **Compiler options**
5151 - Build modes
5252 - Build modes are not visible by default. They can be enabled with a checkbox.
5353 - The GUI is visually above the options GUI pages, thus indicating it has effect on them.
5454 - There is a separate window for managing the modes. Two useful modes, "Debug" and "Release", can be created with a single click.
5555 - GUI for all available options
5656 - Options are read and parsed directly from FPC.
5757 - The "Other" page has a button which opens the generated GUI. The options are synchronized and saved with the custom options memo.
5858 - There is another button for selecting DEFINEs. All added DEFINEs are stored in project options, the selected ones are put to custom options.
5959 - Options in other pages have been rearranged
6060 - "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:
6161 - Append FPC options to packages without touching the lpk
6262 - Changing the output directory of packages without touching the lpk
6363 - Define IDE macros only for some packages or only for the project
6464 - Append compiler options for all projects with build mode "debug"
6565 - Change the package(s) output directory of all projects and packages with build mode "release"
6666 - Append compiler options of third party projects and packages without altering their sources
6767 - The page [[IDE Window: Compiler Options|Inherited]] was moved to the *Show options* dialog.
6868- The window [[IDE Window: Unit dependencies|Unit Dependencies]] was rewritten:
6969 - It shows what units a unit uses
7070 - It shows what units uses that unit
7171 - Search and filter
7272 - Showing packages and projects as graphs
7373- **Designer**
7474 - New designer popup menu item **Reset** for setting control bounds to their ancestor bounds
7575 - Add Frame onto a form: The dialog to select the frame ancestor now scans all sources.
7676- The default test directory of the IDE under Linux was changed from /tmp to ~/tmp to avoid clashes with other users
7777- 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.
7878
7979# lazbuild
8080
8181- Added options --verbose, --quiet and -q to increase/decrease verbosity. You can pass them multiple times.
8282- 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.
8383
8484# Components
8585
8686## TAChart
8787
8888- Series:
8989 - Transparency
9090 - `AddArray`, `AddNull`, `AddX` and `AddY` functions, `SetText` procedure
9191 - `TFitSeries.IEquationText` interface
9292 - `TPolarSeries.CloseCircle` property
9393 - `TFuncSeries.ExtentAutoY` property
9494 - `TBarSeries.GetBarWidth` function
9595- Tools:
9696 - New tool: `TDataPointDistanceTool`
9797 - `EscapeCancels` property for dragging tools
9898 - `TDataPointHintTool`: `UseApplicationHint` property, `OnHintPosition` event
9999 - `TDataPointFragTool`: `Origin` property, `OnDrag`, `OnStartDrag` events
100100 - `TZoomDragTool.RestoreExtentOn` property
101101 - `TChartToolset.DispatchedShiftState` property
102102- Sources:
103103 - `TDbChartSource`: `Options=[dcsoDateTimeX, dcsoDateTimeY]` property, `OnGetItem` event
104104 - `TListChartSource`: `SetText`, `SetColor`, `AddXYList` procedures
105105 - New sources: `TCustomAnimatedChartSource`, `TCustomAxisChartSource`
106106- Axes and marks:
107107 - Axis index property editor
108108 - `TChartAxis`: `Position`, `Value`, `ValueCount` properties, `IsPointInside` function
109109 - Marks: `Arrow`, `Margins`, `Shape`, `CalloutAngle` properties, `OnGetShape` event
110110- Misc
111111 - `TAChartTeeChart` unit with some helpers for migration from TeeChart
112112 - `TChart`: `IsZoomed`, `PrevLogicalExtent`, `AutoFocus` properties
113113 - `TChartExtentHistory` utility class
114114 - 3 new demos: `lazreport`, `animate`, `distance`
115115
116116## TActiveX/LazActivex
117117
118118New package.
119119
120120The 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).
121121
122122See [[LazActiveX]]
123123
124124## TDBImage
125125
126126Delphi compatible behaviour can now be set.
127127
128128Lazarus 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.
129129
130130To allow programmers to use TDBImage more flexibly, including supporting Delphi compatibility, two events to TDBImage were added:
131131
132132``` pascal
133133TOnDBImageRead = procedure(Sender: TObject; S: TStream; var GraphExt : string) of object;
134134TOnDBImageWrite = procedure(Sender: TObject; S: TStream; GraphExt : string) of object;
135135```
136136
137137If 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:
138138
139139``` pascal
140140procedure TMyForm.TDBImageDBImageRead(Sender: TObject; S: TStream;
141141 var GraphExt: string);
142142begin
143143 GraphExt := 'jpg';
144144end;
145145```
146146
147147can be used when the type of the image is always JPEG.
148148
149149Similarly, 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:
150150
151151``` pascal
152152procedure TMyForm.PhotoDBImageWrite(Sender: TObject;
153153 S: TStream; GraphExt: string);
154154begin
155155 if GraphExt <> 'jpg' then
156156 raise Exception.Create('Can only save a JPEG Image');
157157end;
158158```
159159
160160also works for an implicit JPEG.
161161
162162## TFBAdmin
163163
164164This database component allows you to perform administrative actions such as:
165165
166166- add, modify or delete database users
167167- backup and restore databases using single or multiple (split) files
168168- get general database information
169169- get the database log file listing important database events and errors
170170
171171for your Firebird (and probably Interbase) database. It works independently from **TIBConnection**.
172172
173173Please see [[Firebird|Firebird#Database_Administration]] and the example program included with Lazarus for more information.
174174
175175As this is a thin wrapper over the FPC **TFBAdmin** component, please also see FPC documentation and examples for further details.
176176
177177## TFBEventMonitor
178178
179179This 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.
180180
181181Please see [[Firebird|Firebird#Monitoring_Events]] and the example program included with Lazarus for more information.
182182
183183As this is a thin wrapper over the FPC **TFBEventMonitor** component, please also see FPC documentation and examples for further details.
184184
185185## TLvlGraphControl
186186
187187This 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).
188188
189-<figure>
190-<img src="packagegraph1.png" title="packagegraph1.png" />
191-<figcaption>packagegraph1.png</figcaption>
192-</figure>
189+![](/wiki-images/5/52/Packagegraph1.png)
193190
194191TLvlGraphControl Features
195192
196193- Offers automatic topological sorting, with an option to put nodes leftmost or rightmost
197194- You can automatically combine edges. Long edges over multiple levels are combined into single lines with forks.
198195- Provides a heuristic to minimize line crossings
199196- Automatically prevents overlapping of display elements
200197- Nodes can be displayed as rectangles, ellipses or icons stored in a TImageList
201198- You can select nodes using the mouse
202199- You can select multiple nodes at once
203200- You can highlight nodes or edges under the mouse
204201- The control displays back edges in special colours, which facilitates quick visual identification of cycles (e.g. unit circles).
205202- Edges can be drawn straight or curved (bezier)
206203- There is a header caption
207204- Node captions can be shown to the left, to the right, above or below nodes
208205- All colors can be set via published properties
209206- There are events provided to custom-draw and/or skip each part of the default drawing
210207
211208There is a simple example in examples/levelgraph/lvlgraph_dependencies.lpi.
212209
213-<figure>
214-<img src="unitdependencies1.png" title="unitdependencies1.png" />
215-<figcaption>unitdependencies1.png</figcaption>
216-</figure>
210+![](/wiki-images/8/8f/Unitdependencies1.png)
217211
218212## TPQTEventMonitor
219213
220214This 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.
221215
222216As this is a thin wrapper over the FPC **TFBEventMonitor** component, please also see FPC documentation and example programs (e.g. pqeventstest.pp) for details.
223217
224218## TSQLDBLibraryLoader
225219
226220This 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.
227221
228222You should set the library filename before enabling the TSQLConnection.
229223
230224As this is a thin wripper over the FPC **TSQLDBLibraryLoader** component, please see FPC documentation for further details. For now, see e.g. [[TSQLDBLibraryLoader]]
231225
232226## TTIPropertyGrid,TTICustomPropertyGrid
233227
234228Added event **OnEditorFilter** to let user define what properties to show.
235229
236230## Command line utility to create closed source packages
237231
238232The command line utility can be compiled with:
239233
240234`components/codetools/examples/sourcecloser.lpi`
241235
242236It 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.
243237
244238# Changes affecting compatibility
245239
246240## LCL incompatibilities
247241
248242### LCLType INVALID_HANDLE_VALUE now Handle(-1)
249243
250244- Old value: LCLType.Handle(0)
251245- New value: LCLType.Handle(-1)
252246- Effect: ported code from Delphi now works right, code that misused the constant now works wrong
253247- 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.
254248- 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.
255249
256250### LCL WidgetSet Classes (wslclclasses unit)
257251
258252- Old behaviour: VIRTUAL_VMT_COUNT const value was 100
259253- New behaviour: VIRTUAL_VMT_COUNT const value increased to 128
260254- Reason: Ability to add more methods to ws classes (eg. selectAll in TWSCustomListView), without increasing VIRTUAL_VMT_COUNT lcl crashes.
261255- Remedy: unknown
262256
263257### LCL TCustomForm.AddHandlerFirstShow,AddHandlerClose,AddHandlerCreate parameter AsFirst default value changed to false
264258
265259- Effect: old code might now be called after other handlers.
266260- Reason: Consistency with other LCL AddHandler.
267261- Remedy: If your event needs to be called earlier add parameter **true** to call.
268262
269263### LCL TScreen.AddHandlerFormAdded, AddHandlerRemoveForm, AddHandlerActiveControlChanged, AddHandlerActiveFormChanged, AddHandlerFormVisibleChanged parameter AsFirst default value changed to false
270264
271265- Effect: old code might now be called after other handlers.
272266- Reason: Consistency with other LCL AddHandler.
273267- Remedy: If your event needs to be called earlier add parameter **true** to call.
274268
275269### LCL TAction.OnExecute no longer sets TControl/TMenuItem.OnClick
276270
277271- 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.
278272- New behavior: When setting Action.OnExecute no other event is set. On click first the OnClick and then the Action.OnExecute is called.
279273- Effect: Code that checks if OnClick is assigned instead of the Action.OnExecute fails.
280274- Reason: Allow to set separate OnClick and OnExecute events, consistency between lfm and Object Inspector.
281275- Remedy: Check logic of all lines containing "Assigned(OnClick)".
282276
283277Double 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.
284278
285279### LCL TTreeView with Images no longer indents nodes without image
286280
287281- Old behaviour: When the Images of a TTreeView was set, all nodes without ImageIndex were still painted indented as if they had images
288282- New behavior: Nodes without a valid ImageIndex are not indented
289283- Effect: Custom drawn TreeView may now paint at wrong place
290284- Reason: The empty space looked like a bug
291285- 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.
292286
293287### TBitBtn.Spacing default changed
294288
295289- Effect: default Spacing is changed from 3 to 4 px
296290- Reason: Delphi compatibility
297291- Remedy: TBitBtn look
298292
299293### LazUtils CreateRelativePath behaviour changed
300294
301295- Old behaviour: if a relative path could be constructed, this was sometimes appended with a pathdelimiter, and sometimes not.
302296- New behaviour: no pathdelimiter is appended.
303297
304298### LazUtils TrimFilename behaviour changed
305299
306300- Old behaviour: TrimFilename on Windows changed all '/' into '\\' and removed double PathDelimiters.
307301- 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)
308302- Reason: [MS specifications on filenames](http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx)
309303
310304### LazFileUtils / FileUtil handling of pathdelimiters
311305
312306- Old behaviour: several functions only handled PathDelim.
313307- 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.
314308- Reason: compatibility with FreePascal RTL handling of pathdelimiters.
315309- Remedy: two new functions were added to LazFileUtils (ForcePathDelims and GetForcedPathDelims) that change all '\\' into '/' (or vice versa, depending on OS) regardless of AllowDirectorySeparators.
316310
317311### LCLType: fixed typo in constant declaration
318312
319313- Old behaviour: one of the MB_XXXX constants was wrongly named MB_ICONASTERICK
320314- New behaviour: the constant now is named MB_ICONASTERISK
321315- Reason: Compliance with MS standards, Delphi compatibility
322316- Remedy: Use MB_ICONASTERISK instead of MB_ICONASTERICK in calling code (it is used as a parameter in Windows.MessageBox function)
323317
324318### Since 1.2.4: TControlScrollBar.AutoCalcRange was removed
325319
326320- This incompatibility was introduced in 1.2.4 to fix a design flaw.
327321- Effect: compiler error: There is no method in an ancestor class to be overridden: "TYourControlScrollBar.AutoCalcRange;"
328322- 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.
329323- Remedy: Override TYourControl.CalculateAutoRanges instead.
330324
331325## IDE incompatibilities
332326
333327### AllowDirectorySeparators no longer contains backslash under Unix
334328
335329- 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.
336330- Reason: Backslash is a valid character in Unix file names.
337331- Remedy: If you need to change slashes and backslashes to the default path delimiter, use the functions ForcePathDelims and GetForcedPathDelims from unit LazFileUtils.
338332
339333### IDEIntf TOICustomPropertyGrid.Favourites was renamed to Favorites
340334
341335- Effect: old code might fail to compile
342336- Reason: Consistent American spelling
343337- Remedy: Rename used identifier
344338
345339### Global SrcPath was removed
346340
347341The Option *Tools / Options / CodeTools / General / Additional sources* was removed.
348342
349343- Effect: IDE can not find an unit, while compiler can
350344- 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.
351345- Remedy: Add the path to *Project Options / Paths / Other Sources* or to the *Additions and Overrides*.
352346
353347## Other release notes
354348
355349---
356350*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).*
357351Category: Lazarus
358352Category: Release Notes

Back to history