[lazarus] Debug class
Michael A. Hess
mhess at miraclec.com
Tue Jul 6 14:45:16 EDT 1999
Shane Miller wrote:
>
> 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 trick to this is do NOT put the guiapi unit in the uses clause at
the beginning of the program. Place a second uses clauses just before
the code starts. Dang I forget the terms. Is it interface? I have to
wait until I get home to look at some code. When you place the unit at
this location it doesn't create the 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.
Just move the guiapi to the correct location. Oh I know. Look in the
forms.pp file that I sent you. It shows you were to place the
uses guiapi;
line so that it works correctly.
> Before getting into any other reasons, can we find a way to get this
> to work without guiapp inheriting tcontrol?
The above fixes it. :-)
--
==== 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