<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 12pt; color: #000000'><div><span name="x"></span>Hi folks, <br></div><div><br></div><div>I have a design question with circular reference I want to avoid, and I am investigating options. Here is the situation:<br></div><div><br></div><div>- a <b>Dynabook</b> object (likely a singleton) with a <i>schools</i> attribute</div><div>- each <b>School</b> instance has a <i>timeSlots</i> attribute, a collection of <b>TimeSlot</b> describes the time division of a school day</div><div>- deep in the objects tree, Dynabook>school>course><i>courseHours</i> describe the time schedulle of a <b>Course</b></div><div><br></div><div>The <i>courseHours</i> GUI editor needs to refer to the <i>timeSlots</i> collection in the parent <b>School</b> instance. I wonder how to do that properly.<br></div><div><br></div><div>There are possibly several <b>School</b> instances (a person may teach in several schools with different time slot).<br></div><div><br></div><div>I though of several options:</div><div>- to have a <i>school</i> attribute in the <b>Course</b> instance, I don't like the idea<br></div><div>- to have a <i>schoolContext</i> attribute in the <b>Dynabook</b> object. The attribute refers to the <b>School</b> instance in use. I am afraid it could be out of synch easily.<br></div><div>- to pass in reference the <b>School</b> instance to intermediate GUI methods, a bit tedious</div><div>- to search for the <b>School</b> parent instance of a given attribute in the tree by interogating the <b>Dynabook</b> instance. Should work well, may be overkill.</div><div><br></div><div>Options? Opinions?</div><div><br></div><div>Thanks</div><div><br></div><div>Hilaire<br></div><div><br></div><div><br></div><div>Dr. Geo -- http://drgeo.eu<span name="x"></span><br></div><br></div></body></html>