Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I create a new VCX of subclasses programatically
Message
From
15/10/1998 11:41:18
 
 
To
15/10/1998 01:06:38
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00142974
Message ID:
00147164
Views:
54
>>Fred,
>>
>>The class that defines a property/method sets a couple of the reserved memo field indicating the name, type and scope. The subclasses of that class only inherit it, they don't have their own copies of that information. So when you delete the property/method from the class the subclasses just lose it. And you might not notice it because VFP would just create a private memvar for the missing property if the subclass overrode the value. It would error out though the first time you tried to access/set this.TheDeletedProperty.
>>
>
>David,
>
>Where can I find details for tidbits such as this one. I am trying to write an FPD to VFP converter and would like to know where is the best palce to define variables to have scope throughout the form, and where is the best place to place the functions/procedures (without using read-compatibility).
>
>TIA,
>
>Alex

Alex,

Ken Levy replied that the sub-classes properties are in the RESERVED3 memo.
As far as a converter, you could take the functions/procedures that used to be in the CLEANUP section and turn them into METHODS on the converted form. You would also have to change all of their calls to be Object.Method references, though. If the forms are modal, you could just tack them on at the end of the class definition for the form, they should remain in scope, and then you wouldn't have to convert the calls. This is assuming you will be defining the form's class definition in code, not in an .SCX or .VCX. If you do that, then I'd think you'd have to turn them into methods and change things accordingly.

HTH,
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform