Difference between revisions of "Lazarus 1.6.0 release notes"

From Lazarus wiki
Jump to navigationJump to search
Line 57: Line 57:
 
*New option Options / Codetools / Code Creation / Insert new event methods to section
 
*New option Options / Codetools / Code Creation / Insert new event methods to section
 
*New option Options / Codetools / Identifier Completion / Miscellaneous / Jump to error
 
*New option Options / Codetools / Identifier Completion / Miscellaneous / Jump to error
 +
*It now finds sources of units installed via fppkg.
  
 
==Project Groups==
 
==Project Groups==

Revision as of 12:55, 25 November 2015

Template:Translate

Lazarus 1.6.0 is not yet released. This page is under construction!

Statistics:

  1. commits: xxx
  2. log: svn log -r xxxx:xxxx
  3. resolved bug tracker issues: xxx

LCL Interfaces Changes

LCL Changes

  • Added TFlowPanel in ExtCtrls.pp

IDE Interfaces Changes

  • Quick fix for fpc message Local variable "i" does not seem to be initialized inserts an assignment.
  • Local variable completion (e.g. Complete Code on "i:=3;") now groups variables of same type. You can get the old behaviour in Tools / Options / Codetools / Code Creation / Group automatically defined local variables.

IDE Changes

  • Editor
    • Basic multi-caret mode
    • Option for multi-line notebook-tabs
    • line-number part of gutter now allows to select the current line, or several lines.
  • Project
    • Additions and Overrides are now added as last. Formerly they were added after the inherited and before the custom compiler options.
  • Messages Window
    • The IDE now warns when there are duplicate units or include files in packages.
    • Success line. New option to show compiler message "n lines compiled. m sec". Tools / Options / Messages Window / Show FPC message "lines compiled"
  • Environment
    • new Environment setting "Multiple Lazarus instances" to set up what happens if Lazarus is started with a file in command parameter.
  • lazbuild
    • new option --verbose-pkgsearch to show what packages are searched and found.
  • lazarus
    • new option --force-new-instance to force opening a new instance and ignoring the "Multiple Lazarus instances" option.
  • Code navigation and completion for class helpers, record helpers and type helpers.

Components

Codetools

  • Support for type, record and class helpers
  • Support for operator type evaluation "I := A + B;"
  • Improved support for ObjCCategory
  • Class completion of properties can use prefixed variable name and const parameter. See Options / Codetools / Class Completion.
  • New option Options / Codetools / Code Creation / Insert new event methods to section
  • New option Options / Codetools / Identifier Completion / Miscellaneous / Jump to error
  • It now finds sources of units installed via fppkg.

Project Groups

  • New IDE package to manage projects, packages and Pascal files, see here.

Package Tabs

  • New IDE package to replace source notebook tabs/pages with buttons sorted by package and name, see Package Tabs.

Changes affecting compatibility

LazUtils

Unit LazUTF8 now sets UTF8 as default codepage when compiled with FPC 2.7+ making programming with Unicode easier, but there are some incompatibilities. Read more.

LCL incompatibilities

LazUtils CopyFile behaviour changed

  • Old behaviour: CopyFile raised exceptions by default when copying failed under arbitrary circumstances.
  • New behaviour: CopyFile returns False upon all failures, regardless of the reason.
  • Reason: a function that returns False upon failure should not raise an exception in such cases.
  • Remedy: an optional parameter ExceptionOnError has been added. Set it to True to get the old behaviour.

IDE incompatibilities

Components

SynMemo is now Deprecated

  • SynMemo was deprecated.
Any code referring to SynMemo will now give a warning about this.
  • SynMemo was also removed from the component palette.
However SynMemo is still a registered component, and if you open any project already containing a SynMemo it will load correctly.
If you must have an IDE with SynMemo on the component palette, you can compile the IDE with WithSynMemo defined. This is temporary, and will be removed at some point after the release.

SynMemo was nearly identical to SynEdit (except it did publish less properties).

It only featured 2 extra method:

   function CharIndexToRowCol(Index: integer): TPoint;   
   function RowColToCharIndex(RowCol: TPoint): integer;  

Those are now available in SynEdit. However with a strong warning

   experimental; deprecated 'SynMemo compatibility - very slow / SynEdit operates on x/y';

It is highly recommended not to use them. The calculation in those methods was always done without taking in account trailing spaces (if trim trailing spaces was active). This may have lead to wrong results.

A common use case for those methods was apparently:

- Get the caret position as CharIndex.
- Insert some text
- Add the text length to the CharIndex
- Set the caret position from the CharIndex

If setting the text changed trailing spaces (e.g. text was appended at the end of line, behind some trailing spaces, which then would not be trailing any more) then the calculation would not be correct.

Yet if the 2 methods would include trailing spaces, it could equally go wrong. If between getting the caret position, and restoring it any trailing spaces where trimmed, then the restore is wrong.

For this reason, and for the fact that they are extremely inefficient (slow) their use is not recommended.


To archive caret adjustment in SynEdit, use InsertTextAtCaret, TextBetweenPointsEx or SetTextBetweenPoints, which all have the option of adjusting the caret.

TSynEditExporterHtml behaviour has changed

  • Old behaviour: both ExportAsText and CreateHTMLFragment controlled the output.
  • New behaviour:
Output is now controlled by the property Options
The property CreateHTMLFragment is deprecated and will be removed in a future release
ExportAsText now only affects how the exportbuffer is put on clipboard
  • Reason:
More options than CreateHTMLFragment were needed
The comments in the parentclass (TSynEditExport) state that this property controls the way the export buffer is put onto the clipboard
  • Remedy:
Use Options property to control the output.
Remove references to CreateHTMLFragment

Previous release notes