CGEventCreateKeyboardEvent just crashes?!?
CGEventCreateKeyboardEvent just crashes?!?
- Subject: CGEventCreateKeyboardEvent just crashes?!?
- From: Ondra Cada <email@hidden>
- Date: Wed, 4 Oct 2006 13:56:08 +0200
Hi all,
anybody can use CGEventCreateKeyboardEvent?
I create the simplest project possible. Call the function exactly the
way it's documented. And always got a nice small SIGBUS...
Here's my source:
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
// insert code here...
NSLog(@"Hello, Apple World! What's there with them blasted
events?!?");
CGEventRef er=CGEventCreateKeyboardEvent (NULL, (CGKeyCode)56,
true); // directly from docs
NSLog(@"actually, got event ref at %x. Bye.",er);
[pool release];
return 0;
}
Here's the project (I've tried plain C one, too): http://www.ocs.cz/
apps/CGEventCrash.zip
Will be very grateful for any advice what I do wrong...
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden