Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long Path Name
Message
From
26/02/2003 09:37:11
 
 
To
26/02/2003 09:00:53
Julie Ball
Gardner Publications, Inc.
Cincinnati, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00758020
Message ID:
00758053
Views:
14
Julie,

I am not certain from your post why you need a full hierarcy path to an object on the form, but the process is fairly simple.

SYS( 1272 ) will return the full hierarchy path to an object on a form as a string.

The syntax is lcPath = SYS( 1272, oObject ) where oObject is the reference to the object for which a full path is wanted.

To make the full path name more useful in addressing objects, however, you need to replace the name of the form with "thisform".

My code for this purpose, which I generally add to the Init() of a control, is as follows:
*   MyControlObject.Init()
*
LOCAL lcFullPathName

*   Get the fully qualified path name to the object from SYS( 1272 ).
lcFullPathName = LOWER( SYS( 1272, this ) )

*   STRTRAN() out the form name and replace it with "thisform".
lcFullPathName = STRTRAN( lcFullPathName, thisform.Name + ".", "thisform.", 1, 1 )

this.AddProperty( "FullPathName", lcFullPathName )

RETURN
If you do this, all of the objects on your form will know their own full hierarchy path.

Hope this answers your question.
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Reply
Map
View

Click here to load this message in the networking platform