• 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
Re: Store more complex values into NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Store more complex values into NSDictionary


  • Subject: Re: Store more complex values into NSDictionary
  • From: Andrew Salamon <email@hidden>
  • Date: Thu, 25 Feb 2010 16:22:03 -0800

I've run into the need for something like this often enough that I just end up writing a simple container class that mimic's C++'s pair class. Something like this:

#import <Cocoa/Cocoa.h>


@interface My_Pair : NSObject { id first; id second; } + (My_Pair *)pairWith:(id)_first and:(id)_second;

- (id)initWith:(id)_first and:(id)_second;

- (id)first;
- (id)second;
@end

Andrew

On Feb 25, 2010, at 2:51 PM, Daniel Káčer wrote:

Hi,

i need help with solution about store more complex values into NSDictionary.
I have following data which i need store in NSDictionary:


value1:@"A1" value2:@"B1" key:1
value1:@"A2" value2:@"B2" key:2
value1:@"A3" value2:@"B3" key:3
etc.

What is the ideal solution for this my case ?

thnx
Donald
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Store more complex values into NSDictionary (From: "Daniel Káčer" <email@hidden>)

  • Prev by Date: Re: Carbon is C++?
  • Next by Date: [iPhone 3.1] Core Animation that leaves a trial?
  • Previous by thread: Re: Store more complex values into NSDictionary
  • Next by thread: Carbon is C++?
  • Index(es):
    • Date
    • Thread