FROM : Daniel Child
DATE : Fri Apr 01 20:26:37 2005
Hi All,
I have a situation where for the most part it makes sense to set up a
dictonary of objects. The problem is that I want to have more than one
way (key) to access each object, or in db terms, more than one search
field for each record. Is it advisable to set up multiple dictionaries
with their separate keys, but all pointing to one and the same object
(per record)? as in...
myObject_1= <whatever>;
[dictionary1 addObject: myObject forKey: key1_2];
[dictionary2 addObject: myObject forKey: key1_2];
[dictionary3 addObject: myObject forKey: key1_3];
myObject_2= <whatever>;
etc.
Or is this going to cause serious problems. Is there a better way?
Thanks in advance.
Daniel
DATE : Fri Apr 01 20:26:37 2005
Hi All,
I have a situation where for the most part it makes sense to set up a
dictonary of objects. The problem is that I want to have more than one
way (key) to access each object, or in db terms, more than one search
field for each record. Is it advisable to set up multiple dictionaries
with their separate keys, but all pointing to one and the same object
(per record)? as in...
myObject_1= <whatever>;
[dictionary1 addObject: myObject forKey: key1_2];
[dictionary2 addObject: myObject forKey: key1_2];
[dictionary3 addObject: myObject forKey: key1_3];
myObject_2= <whatever>;
etc.
Or is this going to cause serious problems. Is there a better way?
Thanks in advance.
Daniel
| Related mails | Author | Date |
|---|---|---|
| Daniel Child | Apr 1, 20:26 | |
| Guy English | Apr 1, 20:57 | |
| Justin Spahr-Summe… | Apr 2, 02:43 | |
| Ondra Cada | Apr 2, 11:36 |






Cocoa mail archive

