Skip to content

Categories:

Using Barcode Scanners with Adobe Flex and AIR

Recently I was developing and AIR Application that utilized a barcode scanner. When the application loaded, the focus would be on a textinput and the user would scan a barcode to load a record. From there, I used the FlexEvent.ENTER ( enter attribute) to call my Actionscript function that did all the behind the scenes work. However, I found that when I attempted to access the String that the barcode was supposed to pass in (event.target.text), that it was only a partial string. It would work about 50% of the time, but it was a bug that had to be fixed.

I found that Adobe Flex/AIR had problems keeping up with the barcode scanner. Every time I scanned a barcode, it would read the carriage return and dispatch the enter event too early. This was causing the event to fire before the event.target.text attribute was fully set. After trying to solve this problem in my code, I determined that it might be the barcode reader’s settings. So, I picked up the manual and started reading.

I was using the Wasp WDI4500 2D Barcode scanner. There ended up being a setting called USB Keystroke Delay. By default, this setting was set to “No Delay”. All I had to do was scan the Medium Delay 20msec barcode to change the barcode setting. The manual was located in the PDF file that was on the disk included in the box. It was really that simple.

Hopefully this will help someone. I spent too much time trying to troubleshoot this through my code!

Click here to read the ticket on Adobe forums.

Posted in Technology.

Tagged with , , , .


Flex 4.5 – Validating Spark Form Elements

I just started working with the new version of Flash Builder and Flex. I’m trying to use all Spark elements in order to get familiar with the new additions to the language. I ran into a problem when trying to use validators on Radio Buttons. After searching the web, I found almost nothing on how to deal with radio button validation. After experimenting and making a visit to the Adobe Flex forums, I was able to figure out what I was doing wrong.

With most form items, they can listen for the child elements validation error. However, with RadioButtons, it works a bit differently. You have to put the RadioButtons inside of a HGroup or VGroup and set that group as the RadioButton validator’s listener.

I have attached a working example below that will illustrate how to validate various elements in a form. View Source is enabled if you would like to download or view the code using Flex source view.

Visit my thread on this topic at Adobe Flex Forums.

Continued…

Posted in Technology.

Tagged with , , , , , , .


Search Engine Optimization with Google

A few years back I created a web page for K L Builders construction (www.klbuilderscps.com). It was a small website for a construction company based out of a small town. The website had been online for about three years and didn’t really have any external websites linking to it. Until about three weeks ago, the webpage sat dormant without any major updates or additions. I completed the customer’s request and ended up creating a brand new website. After I completed the changes, I decided to take some time and try to increase K L Builders rank in Google Places.

I setup the website with Google Analytics, submitted a sitemap to Google Webmaster Tools, and created business registry pages at Google Places, Merchant Circle and Yelp. I also followed Google guidelines for search engine optimization and added several meta tags to each page of the website. After I completed my work, I periodically checked the rank of K L Builders by use of Google Search and Google Webmaster tools. I was surprised to find that the old website was being cached and all the new pages were not showing up in the search results. I thought to myself, does Google not like K L Builders?

Continued…

Posted in Technology.

Tagged with .


Create a Mint.com Style Login using Flex 4

I recently created an account on Mint.com. I was very impressed with their clean and functional layout, so I decided to create an example of how to create a Mint.com style login in Flex 4. The form below validates the text fields when the user focus out of that specific field. It throws an error tool tip when the user hovers off of the text field and also displays an error icon. I have supplied a working example and code snippet below. I would also like to give credit to FamFamFam for supplying me with the free icons!

Continued…

Posted in Technology.

Tagged with , , .