Re: No Subject
Re: No Subject
- Subject: Re: No Subject
- From: Fritz Anderson <email@hidden>
- Date: Thu, 5 Feb 2004 11:39:34 -0600
The object you have in the NSArray pointer deviceArray is an array of
three NSArrays. The obvious thing to do, since you want the object at
index 0 of deviceArray, is to use [deviceArray objectAtIndex: 0]. As
in:
[objectPopUp addItemsWithTitles: [deviceArray objectAtIndex: 0]];
Did you try this?
-- F
On 4 Feb 2004, at 6:07 AM, email@hidden wrote:
[objectPopUp removeAllItems];
NSArray *deviceArray;
deviceArray = [[NSUserDefaults standardUserDefaults]objectForKey:
@"DeviceList"];
[objectPopUp addItemsWithTitles:deviceArray];
_______________________________________________
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
<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???
_______________________________________________
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.