Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning 2 values from a form
Message
 
To
13/05/1999 01:39:42
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00217461
Message ID:
00218252
Views:
33
>>This is true, but doesn't that "break" the encapsulation of the data, now that the form has to know something (like the variable name) that's outside of it's own definition?
>
>no because you do the CreateObject in the QueryUnload event and return its reference there - where does that breaks the encapsulation?
>
>Arnon

Arnon,

It doesn't break encapsulation but it certainly provides tight external coupling as the calling routine must know the name of the reference to the object and the form must always use the same name.

It is a much better design to pass the parameter object into the form and then let the calling code read the object after the form has terminated. That way the calling routine create the object, the form receives it as a parameter, and the calling routine can investigate the object to see what the form has done to it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform