• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
multiple keys for object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiple keys for object?


  • Subject: multiple keys for object?
  • From: Daniel Child <email@hidden>
  • Date: Fri, 01 Apr 2005 08:26:37 -1000

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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: multiple keys for object?
      • From: Justin Spahr-Summers <email@hidden>
    • Re: multiple keys for object?
      • From: Guy English <email@hidden>
  • Prev by Date: Re: AppleEvents
  • Next by Date: Re: NSToolbar Problem
  • Previous by thread: Re: Scaling Fonts;
  • Next by thread: Re: multiple keys for object?
  • Index(es):
    • Date
    • Thread