No Subject
No Subject
- Subject: No Subject
- From: email@hidden
- Date: Wed, 4 Feb 2004 07:07:03 EST
Had an error, corrected and resubmitted.
From test plist file
_______________________________________________
<key>DeviceList</key>
<array>
<string>XSKey1</string>
<string>XSKey2</string>
<string>XSKey3</string>
</array>
_______________________________________________
Code
_______________________________________________
[objectPopUp removeAllItems];
NSArray *deviceArray;
deviceArray = [[NSUserDefaults standardUserDefaults]objectForKey:
@"DeviceList"];
[objectPopUp addItemsWithTitles:deviceArray];
_______________________________________________
While this code does work with the array "DeviceList" if it has strings
stored in it as listed.
The problem is that each entry in this array is an array with 3 entries and I
only wish to retrieve the first (0) entry from each array.
Here is the actual plist file content
_______________________________________________
From plist file (corrected due to error in pasting)
_______________________________________________
<key>DeviceList</key>
<array>
<array>
<string>XSKey1</string>
<string>LPlat.dat</string>
<string>gvggz55l-a4l94772-uoc9sbg </string>
</array>
<array>
<string>XSKey2</string>
<string>LPro.dat</string>
<string>gvffz66l-a4l84662-uoc8sbg </string>
</array>
<array>
<string>XSKey3</string>
<string>LGold.dat</string>
<string>hkjjm44l-c2319491-ukg6van</string>
</array>
</array>
_______________________________________________
I've tried "arrayForKey" but it doesn't populate the menu and
"stringArrayForKey" doesn't seem to work either so I'm assuming that I should be using
arrayForKey and then extracting the data I require from it, any ideas for a
solution???
Dale
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.