Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get fully qualified object name from object reference?
Message
From
09/01/2009 20:36:59
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
07/01/2009 14:26:51
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01371824
Message ID:
01372505
Views:
24
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform