Re: Programmatically get treecontroller selection
Re: Programmatically get treecontroller selection
- Subject: Re: Programmatically get treecontroller selection
- From: Jonathan Dann <email@hidden>
- Date: Wed, 21 May 2008 19:32:17 +0100
- (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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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