Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ISSUE: sys(1272) and form name
Message
 
 
To
22/07/2005 06:24:37
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01035046
Message ID:
01035175
Views:
12
Fabio,

>* when eval("thisform.name") # thisform
>* expected Hierarchy is _SCREEN.forms[currentFormindex]..... or empty

Exactly why would you expect this at all? _screen.Forms[...] is a non-deterministic value it changes as forms are created and destroyed, so by time you've grabbed it as a value it could be invalidated a nanosecond later.

VFP has never provided a direct link to the name of a memvar holding an object reference, in the case of a DO FORM command there is no long lived memvar holding the object reference. The _screen.Forms[] collection exists to provide access to running forms.

The outermost object name has always been read/write at runtime. A lot of people use sys(2015) to provide a unique name to each form as it instantiates to allow a forms manager class to distinguish one form from another.

>SYS(1272) doesn't return the path string that describes the absolute position of an object,
>but simply it replaces ThisForm.ObjectPathInForm with (thiform.Name).ObjectPathInForm .
>Then it is only usable in the case that a form has 1 alone instance,
>and it is anchored to a variable with his same name.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform