Re: hotkey problem
Re: hotkey problem
- Subject: Re: hotkey problem
- From: Finlay Dobbie <email@hidden>
- Date: Tue, 21 Jan 2003 16:18:34 +0000
On Tuesday, January 21, 2003, at 12:56 am, Salanki Benjamin wrote:
pascal OSStatus LockUIElementHotKeyHandler(EventHandlerCallRef
nextHandler,EventRef theEvent, void *userData)
{
// We only register for one hotkey, so if we get here we know the
hotkey combo was pressed; we can do whatever we want here
NSLog(@"Hello, World! HotKey was pressed!");
[controller statusItemClicked:nil];
return noErr;
}
This is a C function, and as such doesn't have access to your obj-c
object's instance variables, of which controller is one. Fortunately
this is easy to get around by passing a reference to the controller as
the userData parameter.
-- Finlay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.