Re: NSPopUpButtonCell Keeps on Trackin'! Demo, Movie
Re: NSPopUpButtonCell Keeps on Trackin'! Demo, Movie
- Subject: Re: NSPopUpButtonCell Keeps on Trackin'! Demo, Movie
- From: Jim Correia <email@hidden>
- Date: Sun, 26 Apr 2009 18:29:31 -0400
On Sun, Apr 26, 2009 at 10:41 AM, Jerry Krinock <email@hidden> wrote:
> // Table View delegate method.
> // A little more complicated since we have to dig into the
> // parts of the table, and assign it as a header cell.
> - (void) tableView:(NSTableView*)tableView
> mouseDownInHeaderOfTableColumn:(NSTableColumn *)tableColumn {
> NSTableHeaderView *headerView = [tableView headerView] ;
>
> NSPopUpButtonCell* popUpCell = [[NSPopUpButtonCell alloc] init] ;
> [tableColumn setHeaderCell:popUpCell] ;
>
> [popUpCell setMenu:[self makeMenu]] ;
> [popUpCell performClickWithFrame:NSZeroRect
> inView:headerView] ;
> [popUpCell release] ;
> }
What you've done is replaced the table column's header cell, and
started a menu tracking session while the table view was already in
the middle of a mouse tracking session.
What are you really trying to accomplish here?
It is hard to offer advice without knowing what you want to build. But
you are probably going to want to take the approach of using a custom
header view (along with custom header cells as necessary.)
- Jim
_______________________________________________
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