[Lazarus] Delphi-Lazarus compatible code including serial port?
Bo Berglund
bo.berglund at gmail.com
Mon Oct 11 20:21:44 CEST 2010
On Mon, 11 Oct 2010 11:25:45 +0200, Michael Schnell
<mschnell at lumino.de> wrote:
>
>> 1) Sprinkle the code with conditionams for Delphi/Lazarus and use the
>> 5dpo component and its specific calls for Lazarus and the existing
>> code for Delphi. This will be rather ugly since the comm object FComm
>> is used in many places in the code.
>>
>You can easily instantiate AsyncPro in user code in Delphi, too (I'm
>doing this all the time), so that I don't need to "install" complex
>packages with Delphi).
>
>You can do your own "Async" unit (maybe even with an interface very
>similar to AsyncPro, so that you don't need to do many changes in your
>existing code <other than manually instantiating the object). In this
>unit you can use ifdefs or do two versions of same. (please do provide
>this unit as open source :) )
>
Well the original communications code was written back in the last
century using Delphi5 if I remember correctly. In any case it is not
using AsyncPro because we got a much simpler Com port component from a
guy in the UK at a reasonable price, at a time AsyncPro was priced
comparable to the whole Delphi Pro package....
So I have now to camouflage sdpoSerial as a TSerial class where
TSerial is the one we bought so long ago.
When I am discussing old Delphi code:
We made a child off of TListView which we called TEasyListView where
we set certain properties differently (for example we always want it
to be in Report style and we want full row select when clicking).
We also added an event for the select (OnItemSelect) which we use
extensively in all of our lists in the database applications.
Is there any chance at all of getting such a component working
cross-platform on Lazarus/FPC? After all the TListView is a Windows
MFC object.....
I know there is a TListView also in Lazarus, does it sport the same
properties and methods/events as the Delphi one does?
And how do you add a graphics component to Lazarus? There is no
Component menu item like there is in Delphi.
I would like to test by adding the TEasyListView as is if possible.
--
Bo Berglund
Developer in Sweden
More information about the Lazarus
mailing list