Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object name as a property value
Message
De
08/06/2002 12:43:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
08/06/2002 12:21:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00666310
Message ID:
00666312
Vues:
15
>Hi gang-
>
>I haven't programmed in VFP for a little while so I think i am losing my mind asking this. I am trying to have a property (cshipto) as the name of an object on the form (this.parent.cbocustno). Then, I will use the value stored in cshipto to lookup the value of the object (this.parent.cbocustno.value).....is there a way to do this?
>
>In other words, how do i use the value of the property to look up the value in another object?
>
>Thanks for your help...i think this is a gimmie....
>
>Geoff

Geoff,
FWIW do not do it. You might end up with hanging object references. Simply use with..endwith instead. But in any case these are legal :

cshipto = this.parent.cbocustno
*...
myValue = cshipto.Value

You might better handle it by storing the name as string instead. ie:
cshipto = stuff(sys(1272,this.parent.cbocustno),1,len(thisform.name),'thisform')

*....
with eval(cShipTo)
 myValue = .Value
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform