Checking for external input device
Checking for external input device
- Subject: Checking for external input device
- From: Peter <email@hidden>
- Date: Mon, 5 Jul 2004 20:24:27 +0800
I am trying integrating a hand held USB scanner with a Cocoa program.
The scanner have a single button and the manufacturer have provide C
library, and it works fine under OS X (in command line).
int IsScannerButtonPress(); /* Boolean , TRUE if pressed */
I intend to do a code that display a window, "Please press scanner
button to continue" and with mouse click input for button. I would
imagine it to be similar to NSRunAlertPanel() function, except it also
captures scanner button by checking IsScannerButtonPress(). I did a
simple loop like below,
while (IsScannerButtonPress())
sleep(1);
But it does not work well and does not coordinates very well with other
controls. I thought of subclassing NSControl but I think there must be
a simple way of integrating into a Cocoa program without so much work.
Any ideas anyone ?
Thanks,
Peter
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.