<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 04/27/2017 05:52 PM, Donald Ziesig
via Lazarus wrote:<br>
</div>
<blockquote
cite="mid:a32e2f13-a4fc-69df-5dac-3e0a26d1bb10@ziesig.org"
type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<p>Well, I found a bug in Lazarus 1.9 that I thought went away
with Lazarus 1.2.</p>
</blockquote>
<font color="#ff0000">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.<br>
</font>
<blockquote
cite="mid:a32e2f13-a4fc-69df-5dac-3e0a26d1bb10@ziesig.org"
type="cite"><font color="#ff0000"> </font>
<p>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 <span class="moz-smiley-s5"><span>:-D</span></span>).<br>
</p>
<p>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. <br>
</p>
<p>When I clicked on Use | Install, I got the error message:</p>
<p><i>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.</i></p>
<p>Within the component code I have:</p>
<p><tt>procedure Register;</tt><tt><br>
</tt><tt><br>
</tt><tt>implementation</tt><tt><br>
</tt><tt><br>
</tt><tt>uses</tt><tt><br>
</tt><tt> LazLogger,</tt><tt><br>
</tt><tt> Math;</tt><tt><br>
</tt><tt><br>
</tt><tt>procedure Register;</tt><tt><br>
</tt><tt>begin</tt><tt><br>
</tt><tt> RegisterComponents('Ars Magica',[TAMFormPanel]);</tt><tt><br>
</tt><tt>end;</tt><tt><br>
</tt><tt><br>
</tt>Within the package code I have:</p>
<p><tt>uses</tt><tt><br>
</tt><tt> AMFormPanel, LazarusPackageIntf;</tt><tt><br>
</tt><tt><br>
</tt><tt>implementation</tt><tt><br>
</tt><tt><br>
</tt><tt>procedure Register;</tt><tt><br>
</tt><tt>begin</tt><tt><br>
</tt><tt> AMFormPanel.Register;</tt><tt> // I added this. It
did not change the error.<br>
</tt><tt>end;</tt><tt><br>
</tt><tt><br>
</tt><tt>initialization</tt><tt><br>
</tt><tt> RegisterPackage('arsmagicagui', @Register);</tt><tt><br>
</tt><tt>end.</tt> <br>
</p>
<p>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.</p>
<p>What did I do wrong? <span class="moz-smiley-s6"><span>:-[</span></span></p>
<p>Thanks,</p>
<p>Don Ziesig<br>
</p>
<p><br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<p><br>
</p>
</body>
</html>