I have an application I am developing that is turing into a clearly heirarchical type of environment:
A stores an object Bs
Bs is a collection class of object B
B stores an object of Cs
Cs is a collection class of object C
I think you get the drift here
For a while I have been working on how to make the child know about the parent and came across a great article by Ken Getz on collection classes and some other advanced class module information.
He makes reference to a parent property
My question is should I be implementing a parent property for each of the above listed objects? for instance if I wanted to get to the id of object A from object C it would read like this
is this proper implementation?VB Code:
debug.print C.parent.parent.parent.parent.ID
would each collection class store a pointer to it's parent object or would the actual object in the collection store a reference to it's parent?
Any clarification on this would be greatly appreciated.


Reply With Quote