Re: HotKeys in Cocoa
Re: HotKeys in Cocoa
- Subject: Re: HotKeys in Cocoa
- From: Renaud Boisjoly <email@hidden>
- Date: Mon, 26 Aug 2002 21:02:05 -0400
Hi Gang
Quentin has now released a new version of his sample code which works
great!
You can get it at:
http://www.eckysoft.com/~qdc/dev/HotKeys2.tgz
His notes:
I've had two people test it on 10.2, and it appears to work (and still
works on 10.1 as well).
The API has changed from the first release, its a bit more object-
oriented now. And if you aren't shipping for 10.1, you don't need to
bother with the sendEvent: stuff.
On Monday, August 26, 2002, at 08:08 PM, Matthew Formica wrote:
Err, sorry, not a new API but rather, the existing Carbon HotKey API
that is
now compatible with Cocoa. I.e.,
If (10.2 and up)
{
use Carbon HotKey API
}
Else if (10.1.x)
{
use older workaround
}
- Matthew
On 8/26/02 4:59 PM, "Matthew Formica" <email@hidden> wrote:
Just use the new API on 10.2 and the old way (per that sample code)
when you
are running on 10.1.
- Matthew
On 8/24/02 6:50 AM, "email@hidden" <email@hidden> wrote:
I'd love to if I knew how to... I only copied the hack.
I know very little of Carbon and I'm not certain how to implement
this
the normal way if you like...
Renaud
On Saturday, August 24, 2002, at 07:28 AM, Finlay Dobbie wrote:
It seems this sample code is broken under 10.2, anyone found a fix
yet?
When you type the hotkey, the app crashes...
The sendEvent selector of NSApplication will crash if you call it
with an event of type NSSystemDefined.
So make a check that omits calling super if that's the case.
They you'll lose some events, won't you?
Anyway, haven't Apple fixed Carbon Events so they work in Cocoa? You
should be able to use the less hackish way of doing HotKeys in 10.2.
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.