NSUserDefaults and NSArray
NSUserDefaults and NSArray
- Subject: NSUserDefaults and NSArray
- From: email@hidden
- Date: Fri, 13 Sep 2002 15:21:58 +0200
I have an NSArray in my NSUserDefaults i read the array with:
- (void)readMyArray
{
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSArray *myarray;
/* The Dictionary MyArray exist in my .plist */
myarray = [userDefaults objectForKey:@"MyArray"];
[_myList release]:
_myList = [myarray copy];
}
Now i want to use _myList how datasource for an NSTableView
- (int)numberOfRowsInTableView......
{
return [_myList count];
/* Here i have an error [_myList count] return 0 elements and _myList
is nil */
}
Why _myList is nil!!
_______________________________________________
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.