Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Spiffy way to see method code of parent class from FD?
Message
From
19/08/1999 05:55:59
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
18/08/1999 02:40:07
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00253738
Message ID:
00255173
Views:
22
>>When you save a form as a class you have created a form class, the contents are instances of the class that you created them from. When you instantiate a from the form class the contents are NOT subclasses of teh controls that are in the form class. They are simply instances of whatever class they derived from.
>>
>>You are beginning to see why it is not a good idea to save forms as classes. If you want a fomr class then decide what needs to be in it and create the class heirarchy for those things, finally create a form class and put instances of the control classes you created in th form class.
>
>I think I can do that by building a form with all of it's controls to build up a working prototype, then save each of the form's controls separately as a class, right? Then rebuild the form from the control subclasses I've created.
>
>Seems like it would have been nice if VFP did this for you when you save a form as a class: automatically save each of the controls as a subclass of the class from which they were created and then instantiate from these subclasses when the form is instantiated.

You can still do it in the generated code - just move the members' code into their separate class definitions, and just rename their object appearances in the form class code. You may even be very specific and selective about what will remain in the form's class definition, and what will be in the definitions of its members.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform