File: ForDelphians.txt

package info (click to toggle)
lazarus 2.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 214,460 kB
  • sloc: pascal: 1,862,622; xml: 265,709; cpp: 56,595; sh: 3,008; java: 609; makefile: 535; perl: 297; sql: 222; ansic: 137
file content (122 lines) | stat: -rw-r--r-- 4,316 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
This text is for people who know Delphi; it describes differences with Delphi.

The online document is more up to date:
http://wiki.lazarus.freepascal.org/Lazarus_Documentation#Coming_from_Delphi


Delphi -> Lazarus
=================

Lazarus is an Rapid Application Development (RAD) tool like Delphi. That means
it comes with a visual component library and an IDE. The Lazarus component
library (LCL) is very similar to Delphi's VCL. Most units, classes and
properties have the same name and functionality. This makes porting easy. But
Lazarus is *not* an 'open source Delphi clone'. So don't expect 100%
compatibility.

The biggest differences:
Lazarus is completely open source, is written platform independent and uses the
mighty FreePascal compiler (FPC). FPC runs on more than 15 platforms. However, 
not all packages and libs are ported, so Lazarus currently runs on Linux,
Free/Open/NetBSD and win32.

Lazarus is not complete, as is this text. We are always searching for new
developers, packagers, porters, documentation writers, ... .


Delphi IDE -> Lazarus IDE
=========================

Projects

- The main file of a Delphi application is the .dpr file. The main file of a
  Lazarus project is the .lpi file (Lazarus Project Information). A .dpr file
  is the program main source. A Lazarus application also has a .lpr file, which
  is also the main source file. But the .lpr file is nothing more.
  The important file is the .lpi file.
- There is always a project. The only way to "close" a project is to exit
  lazarus or open another project. This is because a lazarus project is also a
  "session".
  This means, the current editor settings are also stored in the .lpi file and
  are restored when you reopen the project.
  For example: You are debugging an application, set a lot of breakpoints and
  bookmarks. You can save the project at any time, close lazarus or open
  another project. When you reopen the project, even on another computer, all
  your breakpoints, bookmarks, open files, cursor positions, jump history, ...
  are restored.


Source Editor

- Nearly all keys and short cuts can be defined in
  environment->editor options->key mappings
  
- The source editor works with comments. For Delphi comments are just space
  between code. No code feature works there and when new code is auto inserted,
  your comments will travel. Under Lazarus you can do a find declaration even
  on code in comments. Although this is not completely reliable, it often works.
  And when new code is inserted, the IDE uses some heuristics to keep comment
  and code together. For example: It will not split the line
  "c: char; // comment".

- Delphi's "Code Completion" (Ctrl+Space) is called "Identifier Completion"
  under Lazarus. The Lazarus term "Code Completion" is a feature, combining
  "Automatic Class Completion" (same as under Delphi),
  "Local Variable Completion" and "Event Assignment Completion". All of them
  are invoked by Ctrl+Shift+C and the IDE determines by the cursor position,
  what is ment.
  
  Example for Local Variable Completion:
  Assume you just created a new method and wrote the statement "i:=3;":
  
  procedure TForm1.DoSomething;
  begin
    i:=3;
  end;
  
  Position the cursor over the identifier "i" and press Ctrl+Shift+C to get
  
  procedure TForm1.DoSomething;
  var
    i: Integer;
  begin
    i:=3;
  end;
  
  
  Example for Event Assignment Completion. A nice feature of the object
  inspector is to auto create methods. The same you can get in the source
  editor. For example:
  
  Button1.OnClick:=
  
  Position the cursor behind the assign operator ":=" and press Ctrl+Shift+C.
  
- "Word Completion" Ctrl+W. It works similar to the "Identifier Completion",
  but it does not work on pascal identifiers, but on all words. It lets you
  choose of all words in all open files beginning with the same letters.

- Supports Include files. Delphi didn't support it, and so you probably didn't
  create many include files. But include files have a big advantage:
  They make it possible writing patform (in)dependent code without messing your
  code with IFDEFs.
  For example: Method jumping, Class Completion, find declaration, .. all
  work with include files.


Designer

- Guidelines


Packages

- see Packages.txt



VCL -> LCL
==========