Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing property of Class
Message
From
09/09/2001 06:16:29
 
 
To
09/09/2001 01:22:47
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00554263
Message ID:
00554373
Views:
10
I have tried that, not bad, but I want to find some "nicer" way.

>Boban-
>
>>>>I want to change property of Class from the method of Form that has been created from Class.
>>>>
>>>Let's clarify it, you want to change a property of a parent class from child class (form) method in runtime, Correct?
>>>
>>Yes. Is it possible?
>
>Usually in OOP, objects inherit from classes. You want the class to be modified by an instantiation of the class (the object).
>
>Sergey asked you for an example, and I'd be curious, too. This is non-standard, so far as I can tell, and it seems like a different approach might be required.
>
>For now I'll make up an example.
>
>Let's say you have a form class with a default height and width. Let's say you instantiate one of these forms, and the user resizes it, and then decides they like the default size and they click a button that says "Set as Default."
>
>I'd take Sergery and Gerry's suggestion and consider this a user preference sort of thing. Store the user's settings in a table. Change your baseclass to look for user preferences before setting height and width. Next time a form of this class is instantiated the base class will use the user's preferences or the default properties.
>
>This doesn't do what you want, which is to literally change the base class properties, but that's compiled code, right?
>
>Do do that you'd have to store the programmatic class in a memo, say, then compile it to an FXP when you want to use it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform