• 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
Dictionary? Array? or other
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dictionary? Array? or other


  • Subject: Dictionary? Array? or other
  • From: Aaron Wallis <email@hidden>
  • Date: Sat, 3 Sep 2005 23:41:26 +1000

Hi Fellow Cocoa Developers...

I've got a little pickle on my hands.
Im fairly new to Cocoa, but im quite familiar to oop development and web languages, so im having a little bit of difficulty overcoming some problems with a cocoa app im building.


I have a script that collects a large amount of data from a user, each line entry that the user offers instantiates a object [ a custom class I developed ] to manage the data, however, Im not to sure what I should [ or can ] use to bind this data together?

for example, lets just say I have 100 objects that are created via a loop.
I need each of those 100 objects to have a unique name, and then to be stored in an array/dictionary/object whatever so I can reference & call the objects methods at any given time...


I've had a stab at using NSMutableArrays and NSMutableDictionarys [as the number of objects will change as the user interacts with the app] however, I have always seemed to fail...

heres some of the code I am using to give you an idea of what im trying to achieve:

// Create a expression object to relate to its properties
expressionEntry * tempExpression = [[ expressionEntry alloc ] init]; <-- this is my custom class
[tempExpression setSeperator : splitStringBy ]; <-- feed it some variables
[tempExpression setResult : splitStringResult ]; <-- feed it more variables


// save the object into the array
[ expressionItems setObject: tempExpression forKey:@"someUniqueID" ]; <-- this is where I would like to save the objects for later use


Any help at all would be greatly appreciated !!!

Thanks
Aaron Wallis.
_______________________________________________
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: Dictionary? Array? or other
      • From: "Dirk van Oosterbosch, IR labs" <email@hidden>
  • Prev by Date: WebKit hierarchy
  • Next by Date: Converting HTML entities to NSXMLNode tree
  • Previous by thread: WebKit hierarchy
  • Next by thread: Re: Dictionary? Array? or other
  • Index(es):
    • Date
    • Thread