Is it possible to get an event when you clic开发者_如何学Pythonk on a token in a NSTokenField?
Seeing as those tokens (NSTokenFieldCell
s) inherit from the NSCell
class, in theory, yes, you can have them send an event by giving them an action and a target (-setAction:
and -setTarget:
respectively, and if you want to give the tokens menus when pressed, use -setMenu:
).
精彩评论