Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add properties to form class that already exist in ?
Message
From
17/09/2008 20:07:50
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
17/09/2008 15:14:07
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01348368
Message ID:
01348444
Views:
18
>>>I have a custom base class form that I use for all the forms in my app. Several custom properties exist in the base class, and then I may add a few more properties in each instance of the form when I use it.
>>>
>>>What will happen if I go back and add those other properties to my base class, but yet it will already exist in certain forms that I have already made based on that class and then added the new properties to them?
>>
>>I think it's going to work fine. The new properties will not be in bold anymore.
>
>What about the values? Say my form-specific value was set to 1, but I make the default value of the base class be 0. Will the 1 still be honored?

Its status should change - it won't be defined as having a default value of 1, now the default value would be 0 but your 1 will now be an override.

>Also, what about methods? I have begun to add a certain method and code in to almost every form, so now I want to go back and stub in the method name in the base class, but it will not have any code. Do you think this mess up the existing method code in the forms?

Same - now these aren't custom methods, these are overriden parent class methods. The key difference is that if you accidentally had any dodefault() in them, it may now do something.

Just backup first before trying this. While I am almost sure I have done this before, I'd still advise to do one method, one property at the parent level, and then run a few tests in design mode and at runtime, see how it behaves, then come back here to curse us, or not.

back to same old

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

Click here to load this message in the networking platform