Re: Object Madness or Restoring Nightmares [message #38324] |
Wed, 03 March 2004 21:06  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> One of what I used to think of as the "advantages" of my
> Catalyst Library is that it is an object hierarchy. If
> you "draw" the top-level object, all the objects below
> get "drawn" automatically. This means widgets appear,
> images get drawn in windows, coordinate systems get set
> up, etc. Neat.
>
> Similarly, if you "destroy" the top-level object, all the
> objects below in the hierarchy get destroyed. No memory
> leaks, no great effort involved. Very, very neat.
Ah, here is the thing about this hierarchy that you
should know. This is an object *containment* hierarchy.
The top-level object is a container that holds all the
other objects. Every object (except the top object) is
both contained in a container and can (potentially)
contain other objects. (All objects in my system
inherit IDL_CONTAINER.)
If you pick any object whatsoever out of this web,
you can (apparently easily to judge from how fast
IDL does it) traverse the entire object hierarchy.
I can see that this is the reason IDL *must* save
everything when I save even a single object that
belongs in the hierarchy.
What I can't see at the moment is a way out of
this mess.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|