• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Flash Builder 4.5 Mobile Login Form needs 2 clicks???

New Here ,
Apr 25, 2011 Apr 25, 2011

Copy link to clipboard

Copied

Hi,

I have been working on developing an application  for the android market thta firstly requires the users to login to a  account. I have put the code together below, along with a data link to a  database in order to check the credentials. However the application  does not switch to the second view on the first click of the "Login"  button however it seems to take 2 or more clicks sometimes. I presume as  it is fetching data from a database that it takes time to be verifies,  could someeone tell me how to solve this and maybe implement a  BusyIndicator along with it?

<![CDATA[
               protected function login_btn_clickHandler(event:MouseEvent):void
               {
                    var match:Boolean;
                   
                    getEmployeesByNameResult.token = employeeService.getEmployeesByName(usr_nme_txtbox.text, pass_txtbox.text);
                   
                    if (getEmployeesByNameResult.lastResult != null)
                    {
                         navigator.pushView(HomeView, getEmployeesByNameResult.lastResult.id);
                    }
               }
          ]]>

<s:Button id="login_btn" width="100%" label="Login"
                                click="login_btn_clickHandler(event)"/>

Thanks

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 13, 2012 Aug 13, 2012

Copy link to clipboard

Copied

LATEST

(While original poster might have found the solution or given up, I guess it's a good idea to leave the question answered)

The service is asynchronous. You cannot check right after calling, instead you need to use a handler for reading the result.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines