Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to remove object
Message
From
29/08/2000 19:07:09
 
 
To
29/08/2000 18:02:27
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00410511
Message ID:
00410548
Views:
19
>It is now obvious I did not tell you all I needed to. This might explain the real problem. The object I want to remove is a container object, place on a page frame of the form. I.E. loObject = THISFORM.pfrTest.pgeTest.myObject.
>
>So, do you mean I should run the THISFORM.pfrTest.pgeTest.RemoveObject()?

Yep, - thisform.pfrTest.pgeTest.RemoveObject('MyObject') removes MyObject from the page pgeTest of pageframe pfrtest of thisform. The page can remove its direct child objects, the pageframe its child pages, the form its child controls. A container acts on its children - to act on the grandchildren, you need to get the proper child to act on your behalf, and RemoveObject() takes the name of the object the container removes, not the object reference to remove.

ie:

thisform could remove 'pfrtest', which eliminates all things contained by pfrtest
thisform.pfrtest could remove 'pgeTest', eliminating all things contained by pgeTest
thisform.pfrtest.pgetest could remove 'myobject'; if myobject were a container (ie a grid) all its chidren die, too
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
Reply
Map
View

Click here to load this message in the networking platform