Detecting NSButtonCell clicks inside an NSTableView

Discussion in 'Mac Programming' started by rand0m3r, Oct 26, 2007.

  1. macrumors regular

    Joined:
    Jun 30, 2006
    #1
    I have an NSTableView which has NSButtonCell as one of the three columns. I don't have a problem with setting the value of the switch/checkbox (on or off) but I don't know how to detect the checkbox being clicked in the first place.

    It seems like mouseEntered: is the closest thing, but I'm not sure how I'm suppose to use it. Is there any form of notification or delegate?
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    I'd suggest reading How Controls and Cells Interact, especially the second paragraph.

    What are you trying to accomplish by checking for when this value has changed? You could also just use KVO.
     
  3. thread starter macrumors regular

    Joined:
    Jun 30, 2006
    #3
    each row of the table is basically a record/object of my model. so when there is a click in the box, i want to change the model to reflect that.
     

Share This Page