• 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
Checking for external input device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: NSBoxSeparator in NSTextField
  • Next by Date: Re: Getting RTFD data into an NSData object.
  • Previous by thread: NSBoxSeparator in NSTextField
  • Next by thread: nsurlprotocol subclass
  • Index(es):
    • Date
    • Thread