>I have created a container class that includes a "Close" command button. I want the button to remove the parent container. (It is added earler thru a NewObject().) I would like to keep it generic in the class Click() method of the button by mentioning the heirarchy instead of the instantiated name of the container. I tried this:
>
> THIS.Parent.Parent.RemoveObject(THIS.Parent)
>
>in the button's Click(), and the results are not pretty.
>
>How can I do this? CAN I do this?
>
>Thanks for help.
In the container, create a ReleaseMe() method, with the following code:
RELEASE THIS
Then, on the Commandx.Click() method, put the following code:
THIS.Parent.ReleaseMe()
This one is simple and it works. I just tested it: no GPF at least on NT :-)
Have fun!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only