Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get fully qualified object name from object reference?
Message
De
09/01/2009 20:36:59
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
07/01/2009 14:26:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01371824
Message ID:
01372505
Vues:
29
>Oops..
>
>That is returning it with the root being the form name, and for some reason THAT is failing when used in a EVALUATE call.
>
>It returns
> "formquote.pageframe1.pageMtlSummary.grid1"
>
>but, when I pass that through Evalulate("formquote.pageframe1.pageMtlSummary.grid1"), it does not resolve it. It says "object formquote is not found."
>
>If the root is ThisForm it does work, but that is not what the sys() method returns.

You only need to replace the first part:
lparameters toRef
c=sys(1272, toRef)
lcRef="Thisform"+subs(c, at(".",c,1))
return c
There's no guarantee as to what the first node of the long reference will be - until the form.init() exits, it may be the form class name (plus a "1", "2" or something), then it may get a different name, depending on what's on the PEM sheet, whether .name was assigned somewhere, whether there are multiple instances of the form etc etc. Not reliable at all, but luckily, we don't need it.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform