Simulating a button press without performClick: (cocoa osx/cocotron)

Posted by Michael Minerva on Stack Overflow See other posts from Stack Overflow or by Michael Minerva
Published on 2010-04-23T22:36:07Z Indexed on 2010/04/23 22:43 UTC
Read the original article Hit count: 334

Filed under:
|
|
|

I need to be able to display popup menu when I press an openGL object. I was able to accomplish this by triggering the performClick: of an inviible NSPopupButton and also by triggering the performClickWithFrame:inView: of an NSPopupButtonCell. Both of these methods were successful on OSX but I also need to target the PC and unfortunately performClickWithFrame:inView: is unimplemented in cocotron and performClick does not cause the menu to be displayed when executed on an NSPopupButton (on cocotron). Now there must be someway for this to work because the NSPopupButton does sucesfully display the NSPopupButtonCell when it is clicked but I know it does not accomplish by calling performClick:. Can I access these lower levels methods used by the NSPopupButton to display my menu or force the invisible NSPopupButton to display its menu? If so can anyone link me to some info about this?

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about osx