[Lazarus] IDE complains about missing Register procedure. [SOLVED]
Donald Ziesig
donald at ziesig.org
Fri Apr 28 02:05:36 CEST 2017
On 04/27/2017 05:52 PM, Donald Ziesig via Lazarus wrote:
>
> Well, I found a bug in Lazarus 1.9 that I thought went away with
> Lazarus 1.2.
>
It is not a bug in the code, just a very obscure and not well documented
checkbox that only appears when the particular file is selected in the
Package dialog. The option is "Register unit" and it must be checked so
the IDE knows what to do with it.
>
> I am in the process of refactoring the code from libraries I created
> in Delphi back in the early 1990's (I learned a lot since then :-D).
>
> I created a package, and copied a previously working component's .pas
> file into its directory, then added it to the package itself. The
> Package compiles with no errors.
>
> When I clicked on Use | Install, I got the error message:
>
> /The package arsmagicagui does not have any "Register" procedure,
> which typically means, it does not provide any IDE addon. Installing
> it will probably only increase the size of the IDE and may even make
> it unstable./
>
> Within the component code I have:
>
> procedure Register;
>
> implementation
>
> uses
> LazLogger,
> Math;
>
> procedure Register;
> begin
> RegisterComponents('Ars Magica',[TAMFormPanel]);
> end;
>
> Within the package code I have:
>
> uses
> AMFormPanel, LazarusPackageIntf;
>
> implementation
>
> procedure Register;
> begin
> AMFormPanel.Register;// I added this. It did not change the error.
> end;
>
> initialization
> RegisterPackage('arsmagicagui', @Register);
> end.
>
> Years ago, I remember getting this error while I was first
> experimenting with Lazarus, but it went away (not sure why) and I have
> been able to create many components in the intervening time.
>
> What did I do wrong? :-[
>
> Thanks,
>
> Don Ziesig
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170427/e5a4c224/attachment.html>
More information about the Lazarus
mailing list