Trouble retrieving selection from NSArrayController
Trouble retrieving selection from NSArrayController
- Subject: Trouble retrieving selection from NSArrayController
- From: "Ayers, Joseph" <email@hidden>
- Date: Tue, 22 Feb 2011 16:30:22 -0500
- Acceptlanguage: en-US
- Thread-topic: Trouble retrieving selection from NSArrayController
I have an app that has a NSTableView populated with and array of Tapes from CoreData. Tapes is declared as:
@interface Tapes : NSManagedObject
{
NSString * TapeName;
NSDate * TapeDate;
NSString * Notes;
NSSet * VideoClip;
}
The TableView is bound to an NSArrayController (tapesController). If I select a row in the table and execute
NSArray * tapeSelection = [tapesController selectedObjects];
Tapes * theTape = [tapeSelection objectAtIndex:0];
the local variable
theTape = (Tapes*) 0x00000000
How do I get a valid selection
Joseph Ayers, Professor
Department of Biology and
Marine Science Center
Northeastern University
East Point, Nahant, MA 01908
Phone (781) 581-7370 x309(office), x335(lab)
Boston: 444 Richards Hall (617) 373-4044
Cellular (617) 755-7523, FAX: (781) 581-6076
Google Voice: (781) 346-9589
eMail: email@hidden<mailto:email@hidden>
iPhone: email@hidden<mailto:email@hidden>
http://www.neurotechnology.neu.edu/
http://robobees.seas.harvard.edu/
http://cyberplasm.net/
_______________________________________________
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