objective c - Cocoa: how to get type of button when I have an "id button" variable -
i'm working on code need able type of button based on "id button" variable. button can either radio, checkbox or plain pushbutton. nsbutton class has setbuttontype member no feature type of button.
you can't. documentation linked to, here's bit on setbuttontype:
the types available common button types, accessible in interface builder. can configure different behavior
nsbuttoncellmethodssethighlightsby:,setshowsstateby:.note there no
-buttontypemethod. set method sets various button properties establish behavior of type.
if need figure out type of arbitrary button, you'll need make table determines buttontype based on possible values of highlightsby , showsstateby.
Comments
Post a Comment