Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DeviledMoon

macrumors newbie
Original poster
Oct 13, 2010
7
0
Hey Guys,

Just wondering, lets say i want to connect the function (OpenApple+Fn+1) to load a menu item.

How abouts would i go about listening for the command and or listening for menu item clicks

i know it has to all be linked, but how would i listen for the commands?

Thanks,
DeviledMoon
 
Hey Guys,

Just wondering, lets say i want to connect the function (OpenApple+Fn+1) to load a menu item.

How abouts would i go about listening for the command and or listening for menu item clicks

i know it has to all be linked, but how would i listen for the commands

Assuming you are using Cocoa + Obj-C, if it's assigned to a menu item, just set the item to that key sequence in Interface Builder and set the action of the menu item to call your method in your code, or use nil-targeted action if it's a multi-document app (in this case connect the item to the First Responder object). The event system will traverse the responder chain until it finds something that implements the method whose name matches the one you set in IB.
 
Assuming you are using Cocoa + Obj-C, if it's assigned to a menu item, just set the item to that key sequence in Interface Builder and set the action of the menu item to call your method in your code, or use nil-targeted action if it's a multi-document app (in this case connect the item to the First Responder object). The event system will traverse the responder chain until it finds something that implements the method whose name matches the one you set in IB.

so in general, i need to setup an Output/function to load what i want it to do, and link that menu item to it?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.