>I created a model form that returns a value.
>
>When I do this;
>DO FORM myform TO x
>
>x contains the returned value.
>
>However, I then saved the form in a class library. How can I call the form class and have it return a value?
>
>When I do this;
>SET CLASSLIB TO myform.vcx ADDITIVE
>ox = CREATEOBJ("mymodelform")
>y = ox.SHOW()
>
>A logical true is always returned. How can I the correct value returned?
>
>Thanks,
>
>Jerryt
Jerry,
Being frankly I don't know if it could ever be done with a classified modal form (I mean returning a value in unload event + createobject()). Even if it could be done it's not a smart way for you could only return one value. There are other ways to do it :
-Initialize var(s) before a call to form and in that form modify those var(s) -This technique is used by wizstyle.vcx, add record to call gridaddform and supply return values (if I remember well in one of your prev. threads initializing an array before a call to form also uses this one).
-Pass caller reference to form so that called form could directly modify caller(form)'s properties, execute methods etc. (Toolbar technique for myself). This could be the best in many cases (ie: instant refresh in caller).
Cetin