Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OverRiding SubClasses at RunTime
Message
From
04/05/1998 14:54:52
 
 
To
04/05/1998 11:32:09
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00096608
Message ID:
00096823
Views:
22
>Just remember that in a control's init(), the form doesn't exist yet -- containers in VFP instance from the inside out. If you need to reference the form, then in the form init() I would feed all the objects to the preference engine, like this
>
>
>*-- Form Init()
>FOR EACH oControl IN THIS.Controls
>  oPreference.Execute( oControl)
>ENDFOR
>
>
>This method might be best since it requiores code in one place only, and the interface control classes don't need to know about the preference engine, and that makes them more reusable.


I learned about the "inside out" approach after making some bad assumptions a while back. Once I had thought about it for a while, it started to make some sense. Your Form Init() approach looks good to me. I find that I'm finally starting to see the OOP approach as something that feels right, rather than something that I have to figure out. This one feels right.

Thanks for the ideas.
Bob
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform