• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble retrieving selection from NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Trouble retrieving selection from NSArrayController (From: "Ayers, Joseph" <email@hidden>)

  • Prev by Date: Trouble retrieving selection from NSArrayController
  • Next by Date: Re: Trouble retrieving selection from NSArrayController
  • Previous by thread: Trouble retrieving selection from NSArrayController
  • Next by thread: Re: Trouble retrieving selection from NSArrayController
  • Index(es):
    • Date
    • Thread