Getting the column from the menu

Discussion in 'Mac Programming' started by davbeck, May 8, 2009.

  1. davbeck macrumors regular

    Joined:
    May 16, 2008
    Location:
    Reno, NV
    #1
    I have an NSTableView set up with the header cell using a menu that displays when right clicked and the items set with an action to my class and that class as the delegate of that menu to update it when it is displayed.
    I need to be able to A) update the selected item in the list based on the column and B) change the value when the selection is changed. This is not a popupcell because there are other options in the menu than the 3 items that change selection (place a check mark next to them).
    How do I get what column was clicked to get the menu?
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Look at columnAtPoint: in either NSTableHeaderView or NSTableView.
     
  3. davbeck thread starter macrumors regular

    Joined:
    May 16, 2008
    Location:
    Reno, NV
    #3
    I saw that but how do I get the location of the menu/right click? Would I have to subclass NSTableHeaderView? I tried that but I got errors that unrecognized selectors were sent to the object (highlightedTableColumn).
    WOW I feel dumb. I was trying to figure out why it was giving unrecognized method of something I didn't over right. Turns out it was a typo. I hate those ones.
     

Share This Page