Forum > Designer

Installing Packages

(1/4) > >>

Degibbo:
G'day all,
For the record: V 1.6.4 FPC 3.0.2
Not everything goes as planned, and examples do not always help, but:
I am having trouble installing a package, which I will call "gaugecontrol".
Lazarus created a second package called "gauge". 

The first package installation complains that gaugecontrol.ppu was found
in the source directory and looks like a compiled unit and that it must be in
the output directory (what ever that is) & option to delete the ambiguous file.

Should I?

I tried to install the gauge package (auto created) but the error is no "register".

All very confusing to a newby.

Can anyone please talk me through how to install the component?

Gaugecontrol is a component that draws a complex gauge on a canvas, that I
use in other units (well I would like to), but even when shown as "installed" the
TGaugeControl can't be found, something about class(?).

howardpc:
Hard to say what goes wrong. By "a package" and "second package" do you mean you have two .lpk files?
Perhaps your best bet is to save the source of the component somewhere safe, noting which class it descends from. Then uninstall the component from the IDE (if it is installed).
Then delete all files and directories related to the failed component.
Make sure you have a stable working Lazarus.
Then use the Package > New component... wizard to create a new package which you name and save in a new location, with just the ancestor class and new component name filled in.
This will give you a new package with a unit containing skeleton code for the new component.
Compile this empty skeleton.
If all goes well, you can then fill out the skeleton component from your saved source.
If not, then perhaps you need to reinstall Lazarus clean?

Degibbo:
G'day HowardPC,
Thanks for the instructions, which made complete sense.

However, I am still in trouble.  The dialog box that shows the package tree
has the cursor in an edit box as if waiting for something like a file name.
clicking compile does something but no confirmation message is returned.

Clicking on use and following the prompts to rebuild Lazarus results in a file
dialog box.  What is supposed to go in there?  I pointed it to where Lazarus
resides - is this correct?

Anyway, something appears to happen (but no prompts to say what).  Closing
and restarting the "new" Lazarus exe results in the file dialog box again, but
still no prompts to say what it is looking for, so I directed it to where it resides
(again).

The package group does not appear on the tool bar, so I am obviously still doing
something wrong

Sorry to be such a pain, but the help file was no help at all.

Cheers & thanks for your kindly support,
DG

howardpc:
Are you trying to install a ready-made package from a third party (.lpk and associated files) or trying to create a new gauge control, installed on the component palette, which you are writing yourself? My earlier suggestions were related to the latter option.

Thaddy:
I think the confusion is this:
For Lazarus to work at design time it needs some code to design.
For your Lazarus application to run it does not need that code.
So often there are 2 packages: one to design, one just for your application.

A well written component will separate the two.

Navigation

[0] Message Index

[#] Next page

Go to full version