[lazarus] Setting callbacks

Michael A. Hess mhess at miraclec.com
Mon Dec 6 16:13:36 EST 1999


Alexandre Grenier wrote:
> 
> From reading the messages, I fell under the impression that the LCL
> was deisgned in a way that we (the users) would have to do stuff we
> should not have to do.

No, that is exactly what we are trying to avoid. We want what would be
normal basic Delphi code to work in both Lazarus and Delphi. In fact it
already does that. It is a simple matter to write an application using
buttons, labels, etc. in a window.

The Hello program in the "lazarus/examples" directory shows that point.
It is simple the main file which in Delphi would be the .dpr file. The
main form file which is helloform.pp. It defines the form and assigns
methods to events such as button1Click. The only difference at this
point is that you must include a ".Create" as the constructor because it
doesn't deal with .DFMs yet. This also means you need to define those
properties in the .Create you would normally define in the DFM file.
Other than that it works and looks exactly like a Delphi application. In
fact I used the indentical code in Delphi to build the same application.

As soon as we get through the IDE and then the Form Editor we will be
able to code the TForm to not required the .Create but use the
information found in the .LFM in the same fashion as Delphi does. While
it might not be possible to port some programs originally written in
Delphi it will be very easy for an experienced Delphi programmer to
immediately be able to code using FPC and the LCL.

> Maybe there is a way one component could be built with 2 interfaces,
> and in delphi compatibility mode it would abstract Delphi's
> interface.. this sounds dumb, but that way we'd be independent from
> borland's "innovations"

I don't think we intend to make Lazarus be totally compatible into the
future. We are building Lazarus to match some of the Delphis features
and capabilities as it now stands. Once that is done I would invision
Lazarus going on a different path from Delphi. Look at it this way. The
reason we want compatibility now is so that someone who has already
written a Delphi app can port it as easily as possible. If after Lazarus
is release they do not use Lazarus to build their Win32, Linux, or
whatever application and continue to use Delphi it isn't our concern to
make their port easy. They should just use Lazarus in the first place.

-- 
==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com






More information about the Lazarus mailing list