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 nsbuttoncell methods sethighlightsby: , setshowsstateby:.

note there no -buttontype method. 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

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -