[lazarus] Debug class
Shane Miller
SMiller1 at stvgb.org
Tue Jul 6 14:09:02 EDT 1999
Michael,
I was adding your code into my Lazarus code to see how it is going to work. I like pretty much everything that you did so I figured I'd implement it and see how it works. I ran into a problem.
Your GUIAPP inherits from TCOntrol. I assume this is because you need to typecast the 'self' sender as a tcontrol to call dodispatchstr. Problem is that won't work. Reason is because TControl needs to call guiapp and if it inherits that class, then there will be a circular reference.
The reason it needs to call it is because the SetName opr SetCaption procedures in TCOntrol need to call it along with TCOntrol's resize function and a few others.
Before getting into any other reasons, can we find a way to get this to work without guiapp inheriting tcontrol? I have a few other problems that I foujnd that this will cause and if we can fix this it'll be a big help.
Does it NEED to typecast them as a TCOntrol or can it use TObject?
Shane
>>> Michael Van Canneyt <michael.vancanneyt at wisa.be> 07/06 2:20 AM >>>
On Mon, 5 Jul 1999, Michael A. Hess wrote:
> Shane Miller wrote:
> >
> > I'll take it and include it with Lazarus for now.
>
> It really should be included as part of the FCL. I just wrote it this
> weekend so I didn't get around to sending to mvc to see about including
> it. MVC your on this list shouldn't this be in the basic FCL stuff?
It is debatable. In my opinion, one of the first enhancements you should make
is that it should be able to open a window with a memo, and display the text
in that, together with a copy in a file.
Then it should be part of lazarus...
So I think you should do the following:
TDebug; <- Your current implementation (enhanced maybe)
TGUIDebug; <- Enhancement to display in a window as well.
(additional Property WindowVisible and methods
ShowWindow, HideWindow. Window should have buttons
'Hide','Debug off')
The TDebug can go in the FCL, TGUIdebug should go in Lazarus.
If you agree on this, then the TDebug can go in FCL, TGUIDebug can go in
Lazarus.
The only problem with this Debug object (in my eyes) is that it makes
your program bigger and slower. {$ifdef}ed code simply isn't there if
you don't want it. Also, the Assert() construct of Delphi is implemented
in the compiler since a long time, why not use that one as well?
What do you think about the above enhancements?
Michael.
_________________________________________________________________
To unsubscribe: mail lazarus-request at miraclec.com with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus
More information about the Lazarus
mailing list