[lazarus] Where is Classe.pp (lazarus)

Michael A. Hess mhess at miraclec.com
Wed Apr 21 16:49:17 EDT 1999


Shane Miller wrote:
> 
> So, should I move "group" all the way down, or is there a way (?virtual function?) to notify a child class of a change caused by the parent .............Can TControl call something in TRadioButton....

If you are accessing the object as a TControl object then no it doesn't
have any way of knowing about TRadioButton methods. TRadioButton of
course is aware of TControl methods. The only down and dirty way would
be to create a pointer to a procedure in the TControl class. Under
normal conditions you would set this procedure to nil. If you create a
TRadioButton it could set this variable with the pointer to the
TRadioClass method you want TControl to call. In other words it would be
a callback method from TControl to TRadioButton. It would be checked and
called by TControl when a change was made. Doing this way doesn't tie it
into TRadioButton. Any object built upon TControl could then use this
point so that it could be notified if a change was made.

Again I could just be talking out of turn again and saying something
stupid.   :-)

-- 
==== 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