Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value from a form in a class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00380150
Message ID:
00382815
Views:
20
My point is also that saying something like "AddProperty() (or AddObject()) is a bad practice" we remove it from our set of tools. But if you do not block yourself with such statements you may suddenly find very useful and surprising
usage for it.

>Another case I had with a previous client. One form with option group for type of input (can't remember exactly what but somewhat generic). Select an option button and input screen changes slightly. Base form had option group and save/cancel buttons. Three classes (one for each input container). Option group selection added object and named it same regardless. This worked wonderfully. Subclassing the form three times would have been overkill. AddObject was the perfect choice.
>
>>
>>One of the cases for AddObject() is assembling the composite classes when it is instantiated. Say, I develop the container class with other classes in it. It makes the development process much easier if I assemble this container with AddObject() in container.Init(). This way in the development process I can have all necessary classes opened with the Class Designer simutaneousely, avoiding the error message "Class .... is in use by MODIFY CLASS"
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform