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
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