Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NEWOBJECT() Has no parent.
Message
From
26/06/2000 18:06:27
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00384767
Message ID:
00384823
Views:
43
David,

What do you do about a class that's not a container class, and doesn't have an addobject method? I ran into a similar problem a while back - I created a sizing object which automatically handles resizing of any object which has a reference to it when it or it's container is resized. In order to do it, I had to pass the "parent" class' object reference to the resize object. To solve the dangling reference problem, I use the same name for this object in all my classes, and in all my base container classes, I created a "custom event" which triggers all the cotained classes to kill the autoresize object reference.

Sounds complicated, and it was, but now that it works in all my baseclasses, I never have to worry about it. Is there a better way to do that?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform