• 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: Programmatically get treecontroller selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically get treecontroller selection


  • Subject: Re: Programmatically get treecontroller selection
  • From: "Hamish Allan" <email@hidden>
  • Date: Wed, 21 May 2008 20:45:47 +0100

I'd like to reiterate what Quincey noted:

"BTW, I notice that the "Cannot perform operation without a managed
object context" error is logged *before* you log "default". The
problem is not apparently anything to do with getting the selection in
the code you posted, since it happens before you do that."

You should try to find out what causes the "Cannot perform..." message
first and foremost -- perhaps by setting a breakpoint on NSLog()?

Hamish

On Wed, May 21, 2008 at 7:32 PM, Jonathan Dann <email@hidden> wrote:
>>
>> - (void)getSelectedAccount{
>>
>>        NSString *accountName = @"Bank";
>>        NSLog(accountName);
>>        accountName = [[MLoutlineViewController selection]
>> valueForKey:@"name"];
>>        NSLog(accountName);
>>
>>        //get managedObjectContext in preparation for fetch code
>>        moc = [MLappDelegate managedObjectContext];
>>
>> }
>
> At first glance, try NSTreeController's -selectedObjects and -selectedNodes
> methods rather than -selection. Also, in my experience I've not found is
> necessary to bind the selectionIndexPath(s) to the outline view to get it
> all to work, maybe unbind that as a quick test?
>
> Jon
> _______________________________________________
>
> 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
>
_______________________________________________

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

  • Follow-Ups:
    • Re: Programmatically get treecontroller selection
      • From: Steven Hamilton <email@hidden>
References: 
 >Programmatically get treecontroller selection (From: Steven Hamilton <email@hidden>)
 >Re: Programmatically get treecontroller selection (From: Jonathan Dann <email@hidden>)
 >Re: Programmatically get treecontroller selection (From: Steven Hamilton <email@hidden>)
 >Re: Programmatically get treecontroller selection (From: Jonathan Dann <email@hidden>)
 >Re: Programmatically get treecontroller selection (From: Steven Hamilton <email@hidden>)
 >Re: Programmatically get treecontroller selection (From: Jonathan Dann <email@hidden>)

  • Prev by Date: Re: Trying to understand -- please help...
  • Next by Date: Re: ANN: Step by step introduction to programming with Cocoa
  • Previous by thread: Re: Programmatically get treecontroller selection
  • Next by thread: Re: Programmatically get treecontroller selection
  • Index(es):
    • Date
    • Thread