Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object as form property
Message
From
05/10/2007 10:02:35
 
 
To
05/10/2007 09:26:17
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01258596
Message ID:
01258905
Views:
12
>>While the other advice you've been given is correct, unless there's a good reason, I'd add the property in the Form Designer and just assign it in Init.
>>
>>Tamar
>
>What would drive the decision to do it one way or another?

If the property is always or almost always needed, it's better design to put in the class than to create it in an instance.

Sometimes, you have a class that you can't or aren't allowed to change (like from a library of some sort), so you have to add properties at runtime.

Also, there are some kinds of things you want to do that are better handled by runtime additions. For example, generic code to handle resizing often adds properties to hold onto some base values. The advantage of doing it that way is that the specific objects don't have to know anything about the generic code.

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform