On Apr 8, 2013, at 3:07 PM, Caylan Larson <i...@caylan.net> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to