Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add properties to form class that already exist in ?
Message
 
 
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:
01348385
Views:
21
>>>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?
>
>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?
>
>I did not realise I was going to want it everywhere, but now I see that I do. The code won't be in the baseclass, but I was hoping to get the method name there, with comments, without losing all the method code I have already placed in the forms.

Yes, the new code will remain, but your comments would be lost. I don't remember what happen with the property, AFAIK the new value would be also preserved.

Just try a test and you'll see. I actually had the same scenario before in the past thus I remember the behavior.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform