[lazarus] MWEDIT TODO's needed

Jeffrey A. Wormsley daworm at cdc.net
Wed Oct 27 22:02:09 EDT 1999



>>>>1) One thing we need to determine is what we are going to use the
property HANDLE for in Linux.  

On 10/27/99 at 5:54 PM dvortex-[gotcha/courrier] wrote:

>Isn't the handle is specificity of the WindowsXX environment ?
>
>I beleive so, and therfore, components shouldn't have access to this
>property.

Technically, yes, but the concept is usable under any toolkit.  With
Windows, the handle allows access to constructs (almost used objects, but
that wouldn't be quite appropriate) that the operating system normally has
control of.  Under Linux, the OS doesn't have this concept, nor for the
most part does X, but the toolkits do.  So the handle will allow access to
the widget.  

>(give me an example of a Lazarus user doing development that would need
>the .Handle property ?)

The application developer probably won't find -too- many uses for it, just
like the Delphi developer doesn't often use it (directly, anyway).  The
people who will use it the most will be us, the component developers.  We
have to have a method for doing this, and while possibly (quite probably,
really) this isn't the absolute best way to do it, there a few very good
reasons to do so.  For one, many of us are familiar with how this works,
and can move forward much quicker.  Another use is to make it much easier
to port existing Delphi components.  Obviously, they will not just
magically work, but the porting effort will be much easier.

>the windows.pp can have it and use it internally, but i don't think that
>it should go through the layers and appear in the LCL.

But it must appear in the LCL for it to be of use at all.  Look at the way
the Delphi VCL is put together.  From the bottom on up, one layer of the
VCL inherits from the previous.  For instance, how hard would it be to
derive a BitButton from a Button if you couldn't use the window handle to
intercept the WinProc, and catch the paint message and do your own painting
of the canvas?  Yes, it can be done other ways.  More easily or faster
(development or runtime) I am not so sure.  This sounds very
Windows-centric (and I admit I am) but after all, isn't one of the goals
not to be unnecessarily incompatable with Delphi?  The odd wording there is
deliberate.  Obvisously we can't be 100% Delphi compatable.

>(am i just shouting garbage ?)

Of course not.  You are perfectly right to say that the average developer
wouldn't use it.  But then, who knows an "average" developer? ;^)  And
given enough time, I am certain we could find a better way to do things,
and still be cross-platform and multiple widget-set capable.  But time
isn't exactly on our side.

Jeff.









More information about the Lazarus mailing list