• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: hotkey problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >hotkey problem (From: Salánki Benjámin <email@hidden>)

  • Prev by Date: show another window from one window
  • Next by Date: Odd-Even backgrounds for NSTableView
  • Previous by thread: hotkey problem
  • Next by thread: Picture Sharing Problem
  • Index(es):
    • Date
    • Thread