• 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
Re: Passing NSTextField Pointer to IOUSBInterfaceInterface182 Callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing NSTextField Pointer to IOUSBInterfaceInterface182 Callback


  • Subject: Re: Passing NSTextField Pointer to IOUSBInterfaceInterface182 Callback
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 11 Apr 2013 22:34:00 -0700

On Apr 8, 2013, at 3:07 PM, Caylan Larson <email@hidden> wrote:

> I'm doing an asynchronous read from a USB printer.  The read works correctly.  My trouble is updating a NSTextField from within the callback.

I don’t know the USB API, but I’d guess the callback gets invoked on some background thread, in which case you cannot call AppKit code from it. Your callback should instead dispatch a block to the main thread’s dispatch queue.

>                                               &(_printerOutput)

Don’t use &. It should just be _printerOutput, or perhaps (__bridge void*)_printerOutput.

—Jens
_______________________________________________

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


References: 
 >Passing NSTextField Pointer to IOUSBInterfaceInterface182 Callback (From: Caylan Larson <email@hidden>)

  • Prev by Date: Re: cocoa -draggingImageComponents not called
  • Next by Date: presentViewController completion block usage
  • Previous by thread: Passing NSTextField Pointer to IOUSBInterfaceInterface182 Callback
  • Next by thread: Simple Vector Based Line Charts
  • Index(es):
    • Date
    • Thread