[Lazarus] Using a component OBJ file in Lazarus?

Bo Berglund bo.berglund at gmail.com
Tue Jun 12 00:08:42 CEST 2018


On Mon, 11 Jun 2018 23:17:30 +0200, Mattias Gaertner via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>On Mon, 11 Jun 2018 21:03:14 +0200
>Bo Berglund via Lazarus <lazarus at lists.lazarus-ide.org> wrote:
>
>> On Mon, 11 Jun 2018 10:23:44 +0200, Michael Schnell via Lazarus
>> <lazarus at lists.lazarus-ide.org> wrote:
>> 
>> >On 10.06.2018 15:11, Bo Berglund via Lazarus wrote:  
>> >> ... Build IDE: Exit code 2, Errors: 23 ...  
>> >
>> >You want to compile some 3rd party Dongle code in the IDE ?
>> >
>> >That is more than weired !
>> >  
>> 
>> Sorry, I don't really know what you mean here...
>> What is the reason for this comment?
>> Unlike Delphi it seems like when one wants to add components to the
>> development IDE palette in Lazarus one has actually to *rebuild* the
>> IDE, there seems to be no otehr way...
>
>Yes. But you don't need to 'install' every package. Only those with
>actual IDE code.

In this case with IDE code do you mean it contains a GUI visible part
that can be manipulated inside Lazarus (like a listbox for example)?
THere is no such thing. When dropped on a form only the icon shows up
and it is invisible in the running program.

>Since your package contains Register procedures it probably has
>design time stuff.

I don't know what counts as "design time stuff"...
There is no GUI stuff in the unit at all. But it can be dropped on a
form just like a Dialog component can. Then it is possible to
manipulate the published properties of the component in the Delphi
Object Inspector.
And there is one event handler OnKeyAlarm that can be implemented via
the Events tab in Object Inspector.

If this counts as "design time stuff" then it has.

I mentioned the 3-year old de-componentified version of the source
file I found in an experimental folder on my hard disk. This has been
stripped of the component parts (like the Register method), but it has
the same set of public and published properties as the original.

So if I manage to port the least complex of the analysis programs I
will use the dongle class file rather than the component.
The strange thing is that the included library (COFF file) seems to
work in Lazarus in this use case, but not when trying to install as a
component....


-- 
Bo Berglund
Developer in Sweden



More information about the Lazarus mailing list