Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clicking token in NSTokenField

Is it possible to get an event when you click on a token in a NSTokenField?

like image 673
Tom Nys Avatar asked Jan 03 '11 21:01

Tom Nys


1 Answers

Seeing as those tokens (NSTokenFieldCells) 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:).

like image 171
Itai Ferber Avatar answered Sep 28 '22 06:09

Itai Ferber