Re: Trouble retrieving selection from NSArrayController
Re: Trouble retrieving selection from NSArrayController
- Subject: Re: Trouble retrieving selection from NSArrayController
- From: Mike Abdullah <email@hidden>
- Date: Tue, 22 Feb 2011 22:26:17 +0000
On 22 Feb 2011, at 21:30, Ayers, Joseph wrote:
> 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
Logically, this must be because tapesController or tapeSelection is nil. I suspect the former.
_______________________________________________
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