[lazarus] LCL circles
acjgenius at earthlink.net
Fri Oct 25 09:35:34 EDT 2002
Mattias Gaertner wrote:
> On Thu, 24 Oct 2002 16:07:24 -0400
> "Andrew Johnson" wrote:
> >On Thu, 24 Oct 2002 12:52:25 +0200
> >"Mattias Gaertner" wrote :
> >>Hi all,
> >>After successfully breaking a circle in the LCL, I checked some other
> >>There were five, that were very easy to break without loosing any
> >>These are at least three other, which have to be checked:
> >>stdctrls.pp <-> forms.pp
> >>interfacebase.pp <-> Dialogs, Forms, StdCtrls, ExtCtrls, Graphics,
> >Okay.. The Dialogs is pointless. it serves no purpose as far as I can
> >tell, Stdctrls is used by the generic drawtext I wrote because of
> >DeleteAmpersands, this can be fixed by moving DeleteAmpersands to the
> >generic interfaces code. Everythings else is pretty much all my fault.
> >And I do not know how to fix it yet.
> >Basically the rest is used by my generic PromptUser & RequestInput
> >forms. To make Message Dialogs Interface Dependent, I copied the code
> >from message dialogs into these routines so they could be overriden by
> >interfaces, as I have started with GNOME, and planned on doing with
> >Win32. But for the generic routines, I couldn't figure out how else to
> >do them since the lower level functions I would have used on Win32
> >aren't available, so I have to use the LCL components directly just as
> >in Dialogs, which of course create the loops. If you can figure out
> >how to fix this please tell me! Its been bugging me since I did it,
> >but I couldn't see any way around it, and still don't.
> PromptUser and RequestInput are our own creations and have no
> counterpart in the VCL. So, we can do what we want. Both functions now
> simply call handlers instead of doing everything on their own.
> And because both shows dialogs, I moved the code to dialogs.pp. Andrew I
> renamed your TMessageBox from interfacebase to TPromptDialog. Can we
> join TMessageBox and TPromptDialog?
Wheeew. you had me freaked there for a second! But nice way of handling
things. We might want to do the same for InterfaceBase MessageBox too.
As for the TMessageBox vs. TPromptDialog, I am actually almost done
doing this. The whole point behind PromptDialog was to have an Interface
dependant way of handling messages, so that for instance GNOME dialogs
could use the GNOME routines, thus making GNOME enabled Lazarus apps
more GNOME'ish. ShowMessage already usess NotifyUser(atXY), which are
really wrappers around promptuser(AtXY) themselves. I Just realizsed
that since we do not have Dynamic arrays my current Implementation would
make the MessageDlg wrappers a bit more difficult to write, so I
resesigned the PromptUser routines to use a PLongint to handle the
Buttons, instead of an array. Now that I have that I have started
testing out versions of MessageDlg's that use these instead. When I am
done TMessageBox can be deleted altogether, and we will only need
> Then I broke some minor circles, also fully compatible and moved
> DeleteAmpersands to the new lclproc.pas. I also accelerated this
> function and hope it does the same as before.
Looks like it is working fine so far.. It should only affect self-draw
components, this includes TSpeedButton, TStaticText, and the Property
Editor. And all of the above apear to work fine for me.
More information about the Lazarus