• 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
CGEventCreateKeyboardEvent just crashes?!?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: CGEventCreateKeyboardEvent just crashes?!?
      • From: Eric Schlegel <email@hidden>
    • Re: CGEventCreateKeyboardEvent just crashes?!?
      • From: Philip Dow <email@hidden>
  • Prev by Date: Dragging destination of NSButton inside NSTabView possible?
  • Next by Date: Re: CGEventCreateKeyboardEvent just crashes?!?
  • Previous by thread: Dragging destination of NSButton inside NSTabView possible?
  • Next by thread: Re: CGEventCreateKeyboardEvent just crashes?!?
  • Index(es):
    • Date
    • Thread