• 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: NSPopUpButtonCell Keeps on Trackin'! Demo, Movie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSPopUpButtonCell Keeps on Trackin'! Demo, Movie
      • From: Jerry Krinock <email@hidden>
References: 
 >NSPopUpButtonCell causes UI to "sleep" when clicked (From: Jerry Krinock <email@hidden>)
 >Re: NSPopUpButtonCell causes UI to "sleep" when clicked (From: Peter Ammon <email@hidden>)
 >Re: NSPopUpButtonCell Keeps on Trackin'! Demo, Movie (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Drawing Across NSTableView Columns
  • Next by Date: Re: figuring out which TableView I am?
  • Previous by thread: Re: NSPopUpButtonCell Keeps on Trackin'! Demo, Movie
  • Next by thread: Re: NSPopUpButtonCell Keeps on Trackin'! Demo, Movie
  • Index(es):
    • Date
    • Thread