Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return value from form after creating form in code
Message
De
12/03/2003 20:03:48
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00693423
Message ID:
00765218
Vues:
33
Hi Jim,

I hope you can help with this blank wall I am facing. I believe it's in some way related to this thread(?)

You see, I have created a form class that accepts a user business object as parameter and then is supposed to display its assigned rights. The form class just contains a grid which displays the privileges available and has a checkbox column to grant (or not grant) selected line to user. My code goes something like this.
oUser = NEWOBJECT( "BIZOBJCLASS", "MYCLASSLIB", "", ... )
oRights = NEWOBJECT( "FRMRIGHTSCLASS", "MYCLASSLIB","", oUser )
The above code will generate an "Error Instantiating Object" error message on the 2nd line.

However, if I used DO FORM on the 2nd line like so:
oUser = NEWOBJECT( "USER", "MYCLASSLIB", "", ... )
DO FORM frmRights WITH oUser
It works. Why so?

Thanks in advance,

Dennis

>Alex,
>
>I would return an object simply because the object can have many properties that can tell you all kinds of stuff about what wnet on. Thr object could, for instance have the following properties;
>
>
>Object.cStatus && Your status information success mught be blank and
>               && non-success could be a character string
>
>Object.cValue  && the expected value in your example the student ID
>
>Object.ValueType  && Might be Fi=ull time student versus part time student
>
>etc.
>
>
>You can see that once you change to passiong and returning objects the potential flexibility is amazing.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform