Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can We Return Values From Class Objects
Message
De
29/07/2001 18:52:34
 
 
À
26/07/2001 23:02:31
Devrishi Bhogra
Escorts Claas Limited
Faridabad, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00535541
Message ID:
00537034
Vues:
14
>Hi David!!
>
>Good Day!!
>
>eg:
>1. local oFrm
>2. oFrm= createobject('myform')
>3. oFrm.show(1)
>4. itemno= oFrm.myitemno
>
>
>david before posting thread ,i was doing it in the sameway. But at line no. 4 it says itemno is not an object. that is why i posted the thread.
>

>Because when focus shifts back to calling form , instance of the myform is not there in memory. this what i figured out.
>
>But later i did it with a trick...(by hiding the stdhelp form in double click event of listbox,or command button)
>
That's not a trick, you don't wan't the form released, only hidden, as you have done. I have a property in my form base class called "lHideonExit" which does a hide instead of a release when the user closes the form in any way.

>Calling form :
>local oHelp,Retval
>oHelp = createobject("StdHelp")
>oHelp.properties = ..... && set different properties here
>
>oHelp.show(1)
>
>Retval = oHelp.Retvalue
>oHelp.release()
>
>
>
>*---- StdHelp form
>-- eg. in the double click event of listbox
>
>thisform.Retvalue = thisform.lstbox.value && set the value to be returned
>thisform.hide()
>
>
>Now please tell me that is it a right approach or there is something else can be done.
>
>Also David please guide how can i use classes in my projects and how people become MVP.
>
That's a tough question! To use classes in a project, one approach would be to
say SET CLASS LIBRARY TO MyClassLib in your main program and the project manager will add it automatically next time you build the project. Or you can just "Add" a class, which will automatically add the library which contains it.

I'm not sure how MVP is awarded, maybe ask someone who is one.

>Regards
>
>Sunny
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform