Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Createobject() and returning a parameter
Message
From
31/08/1997 04:33:40
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00047277
Message ID:
00047838
Views:
54
> The much more tricky issue is returning a value from a modeless form. Many > people will argue that you should never have to do this but I have found it > useful in certain cases. If you are interested, let me know. > > Darrel As much as I've found in kbprg.hlp (or something like that), the recommended way is to have a return variable set outside of the form, run the form, and have some of the form's methods set its value. That's what M$ said. They suggested having a wrapper class, which should set the variable, call the form and then return the variable, so it behaves like a function. IMO, not much OOP, nor it's elegant - it's just a typical M$ cludge, for cases they never thought of. There's another idea for calling a CreateObectED form - it may have some parameters passed, so these may be passed by ref. Still, those parameters may be visible to form.init only, and therefore any changes to them may be lost when form.init exits. Really, is there any solution to returning value from a form except using Do Form xxx to myvar, for modal forms. Besides, if a CreateObectED modal form returns value from its Unload method, where does the value go?

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