• 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
Cocoa callback handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Cocoa callback handling
      • From: "Shawn Erickson" <email@hidden>
    • Re: Cocoa callback handling
      • From: Jonathon Mah <email@hidden>
  • Prev by Date: Re: dealloc for cleanup versus freeing memory
  • Next by Date: Changing permissions for folder using cocoa
  • Previous by thread: Re: NSTextFieldCell and trackMouse
  • Next by thread: Re: Cocoa callback handling
  • Index(es):
    • Date
    • Thread