I guess I should not have used the term Section of the app.

The app is standalone and it's only purpose is there to spit back data about 
the product entered via the barcode scanner.

I don't want the user to have to click on anything.  They scan and they get 
back data.  The only focus I suppose will be the Air application itself.  That 
will have to have focus out of other applications running on the computers 
desktop.

Thanks for the feedback!

Once I get this more into the proof of concept range I will try out the code.

Now maybe once this app gets toss around some more.  There will be the need to 
scan the barcode, display the data, then alter the data and submit it back to 
CF, but for right now that is not the case.




-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jeffry 
Houser
Sent: Tuesday, November 20, 2007 11:59 AM
To: [email protected]
Subject: Re: SPAM-LOW: [flexcoders] Re: Air/Flex App With Barcode Reader


  Conceptually this sounds good.  However, I would expect this method 
would be non-intuitive to users.

  Containers will not broadcast keyboard events on their own, so the 
user must have have given focus to a component that will broadcast the 
keyboard events.  I believe there are a lot of situations, such as 
changing the selectedIndex of a ViewStack or tabbing through a 
TabNavigator where nothing will be given focus and the bar code scan 
would be ignored.



Josh VanderBerg wrote:
> 
> 
> Define a keyDown event handler at the application level. Because of
> the Flex 2.0 event model, all keydown events, from all controls,
> should bubble up to the Application. Here is a little application I
> made to test this. The bottom text area will show all keys typed, no
> matter the control that has the focus when the key was pressed.
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application keyDown="keyCapture(event)"
> xmlns:mx="http://www.adobe.com/2006/mxml 
> <http://www.adobe.com/2006/mxml>" layout="vertical">
> 
> <mx:Script>
> <![CDATA[
> private function keyCapture(event: KeyboardEvent) : void {
> allKeys.text += String.fromCharCode(event.charCode);
> }
> ]]>
> </mx:Script>
> 
> <mx:Label text="Text1" />
> <mx:TextArea id="textArea" height="200" width="200" />
> <mx:Label text="Text2" />
> <mx:TextInput id="textInput" />
> <mx:Label text="Button:" />
> <mx:Button label="Set Focus here" />
> 
> <mx:Label text="Key Capture" />
> <mx:TextArea selectable="false" id="allKeys" width="400" height="400" />
> 
> </mx:Application>
> 
> __
> Josh Vanderberg -- http://vanderblog.typepad.com 
> <http://vanderblog.typepad.com>
> 
> --- In [email protected] <mailto:flexcoders%40yahoogroups.com>, 
> "Chad Gray" <[EMAIL PROTECTED]> wrote:
>  >
>  > Hello,
>  >
>  > I am just doing research and need some input.
>  >
>  > We would like to make an Air/Flex app that when you scan in a
> barcode you get product details from a database that CF is serving out.
>  >
>  > The barcode scanner works like a key board and at the end of a scan
> I can have it send a carriage return. I don't want the user to have
> to put focus on a text input field then scan the barcode to get a
> result. I want them so that any keyboard entry from the scanner will
> always pull up product details upon the carriage return.
>  >
>  > It does not matter what section of the Appliction they are in. If
> text entry is present from the barcode scanner then I want to return
> product details from the database.
>  >
>  > Has anyone built an app that works with a barcode reader in this way?
>  >
>  > Any quick code suggestions on capturing the text input from the
> barcode reader?
>  >
>  > Thanks!
>  >
> 
> 

-- 
Jeffry Houser, Technical Entrepreneur, Software Developer, Author, 
Recording Engineer
AIM: Reboog711  | Phone: 1-203-379-0773
--
My Company: <http://www.dot-com-it.com>
My Podcast: <http://www.theflexshow.com>
My Blog: <http://www.jeffryhouser.com>



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links





Reply via email to