Re: Slow scrolling after NSPopup implementation
Re: Slow scrolling after NSPopup implementation
- Subject: Re: Slow scrolling after NSPopup implementation
- From: Kyle Sluder <email@hidden>
- Date: Fri, 15 May 2009 06:53:21 -0400
On Fri, May 15, 2009 at 6:41 AM, Steven Hamilton <email@hidden> wrote:
> Hmm, clearly I'm doing it all wrong. I assumed (from past problems) that the
> delegate method can't return a value to an popup in a tableView and that you
> use the opportunity of the method call to set the selectedIndex. I've now
> changed the code to the standard;
NSTableView has a delegate method called
-tableView:willDisplayCell:forTableColumn:row: that you can use to
change the selected item in the NSPopUpButtonCell, or even replace the
menu items in that cell. Relying on the order of calls to the
-tableView:objectValueForTableColumn:row: data source method is prone
to breakage, and causing KVO notifications inside of it is slow.
--Kyle Sluder
_______________________________________________
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