Cocoa callback handling
Cocoa callback handling
- Subject: Cocoa callback handling
- From: "James Trankelson" <email@hidden>
- Date: Mon, 6 Aug 2007 03:47:22 -0400
Hello,
I've got a device (3DConnexion spacenavigator) that I'm trying to
integrate into my Cocoa app.
The SDK provided allows an app to register for callbacks via a function:
oserr = InstallConnexionHandlers(SNHandler, 0L, 0L);
Where SNHandler is the procedure invoked by the driver when it receives data.
I have an application class that registers for callbacks in it's
awakeFromNib procedure, and I receive callbacks as expected. The
problem is that callback handling is interfering with the fluidity of
my running app. I'd like for this callback to be invoked in a separate
thread, and get the notification when processing is done. I'm
particularly confused about how to get this to work.
I've tried the obvious:
[NSThread detachNewThreadSelector:@selector(setupSN:) toTarget:[self
retain] withObject:self];
Where the setupSN procedure sets up the callback. The callback
initialization proceeds fine, but the callback procedure is never
called. Is there something I need to do to get my callback to be
called when setting things up in a separate thread like this? Can
someone help me understand why I don't receive callbacks?
Thanks.
-jt
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden