Note that there are some explanatory texts on larger screens.

plurals
  1. POCross referencing multiple objects
    primarykey
    data
    text
    <p>Ok, so I'm having a hard time coming up with a 'good' way to do the following:</p> <p>Group 4 objects so that if I Object A I can easily and without having to go through Objects B &amp; C to find out if Object D relates to Object A. As well as any other combination of referencing.</p> <p>I am currently using SortedLists to link A to B and B to C and C to D and doing a really sloppy job of cross referencing them. This works, but its really, really ugly. I don't like ugly code unless there is no other way to do it.</p> <p>I'm thinking of using a class to store the objects. But what would be the best way to reference them?</p> <p>Thanks in advance</p> <hr> <p>More info:</p> <p>The objects are controls on a form. The 4 different controls are all related to each other in that they correspond to the same setting that they are used to configure. There are multiple settings that get modified on the form, each using 4 controls.</p> <p>I need a way to easily reference them without having to call Setting4ControlB.Checked or Setting2ControlD.text, thus the linked lists. I'm using generic events for certain controls in order to reuse code, they all do the same thing, except they reference different objects.</p> <p>The ugly portion is first, setting up the links, and second, doing the referencing from A to D or C to A, etc. I wanted to be able to do something like this:</p> <p>GetSettingControls(ReferencingControl).ControlA.Checked</p> <p>ReferencingControl would be the sender in the event, ControlA is a control that is related to ReferencingControl.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload