Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine the object existed
Message
From
01/09/1999 00:55:00
 
 
To
31/08/1999 23:45:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00260014
Message ID:
00260028
Views:
15
>Hi,
> I have a control (mycontrol) that allocated in myform.pageframe.page1.container
>How could I determine that mycontrol is a "child" in my form?

Short of digging down into the form to check the class that each control was derived from, there are a couple of ways to check. If you have an object and want to know what form it's a part of, as long as the form was an SCX launched by DO FORM, SYS(1271) returns the name and path of the SCX containing the object at runtime.

If you have an object reference, SYS(1272) will give you the containership hierarchy of the object. It won't dig back past the form/formset level.

>I tried to use sys(1272) and PEMSTATUS(), but I don't get what I I need.
>Sys(1272) return the same thing I passed to it and PEMSTATUS only check for the top 1st level of child and not go deep. How could I implement this without having to go through each of the controls?
>
>?SYS(1272,myform.pageframe.page1.container.mycontrol)
>

If you know that, you're set - you know the containership. If you want to start from the top and check to see if the control is present, look at\ using AMEMBERS() and dig down to find it.
>Thank you
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform