Sign in Join
Wiki copytemporary

Register (package): what changed

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

Title: Register (package)

OldNewLine
1+A [[Lazarus Packages|Lazarus package]] that is intended to be installed needs a **Register** procedure which declares
2+
3+- all the package components and corresponding files
4+- the tab on which the [[component|components]] are to be located.
5+
6+Related procedures/functions
7+
8+- [[RegisterUnit]]
9+- [[RegisterPackage]]
10+- [[RegisterComponents]]
11+- [[RegisterPropertyEditor]]
12+- [[RegisterIDEMenuCommand]]
13+
14+``` pascal
15+unit RegisterMyPackage;
16+
17+interface
18+
19+ uses
20+ LazarusPackageIntf, MyPackage1, MyPackage2, MyOtherPackage;
21+
22+implementation
23+
24+procedure Register;
25+begin
26+ RegisterUnit( 'MyTab', @MyPackage1.Register );
27+ RegisterUnit( 'MyTab', @MyPackage2.Register );
28+ RegisterComponents( 'OtherTab', [TOtherComponent1,TOtherComponent2] );
29+end;
30+
31+initialization
32+ {$I myresourcefile.lrs}
33+
34+ RegisterPackage( 'MyTab', @Register );
35+end.
36+```
37+
38+---
39+*From the Free Pascal wiki, page "Register (package)", as it stood on 2020-02-25 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).*
40+Category: Component Creation
41+Category: Packages

Back to history