When I change state the UI does not update

I have some code that uses state changes to manage the buttons in a login screen:
        <mx:states>
                <!-- Default state: the LoginWindow accepts input from the user -->
                <!--  Login
                        login is in progress.
                        No input allowed other than the "Cancel" button
                -->
                <mx:State name="{STATE_LOGIN}">
                        <mx:SetProperty target="{loginForm}" name="enabled" value="false"/>
                        <mx:SetProperty target="{loginButton}" name="enabled" value="false"/>
                        <mx:SetProperty target="{cancelLoginButton}" name="enabled" value="true"/>
                        <mx:SetProperty target="{statusLabel}" name="text"
                                                        value="{resourceManager.getString(ResourceNames.BUNDLE_NAME,
                                                        ResourceNames.LOGIN_CONNECTING_STATE)}"/>
                </mx:State>
The problem is that when I change the state by setting currentState to STATE_LOGIN the UI change does not happen right away. In fact it doesn't take place until the login event is complete, creating a race condition.
However, I've been able to work around this problem by explicitly setting the values of loginButton.enabled and cancelLoginButton.enabled in my program:
          loginButton.enabled = false;
          cancelLoginButton.enabled = true;
When I do this, the buttons are enabled in the right way.
Why does explicitly setting the button enabled flags work, but the state change, which should do the same thing, not?

Nope, that's not it. I just now tried changing the state values to constant values and it did the same thing. Also, BTW, the state eventually does change even with the binding expressions -- it just doesn't change until after the login is done (I also tried putting the call to the login in a callLater; made no difference). But, as I said, when I assign to the enabled fields the change happens right away.

Similar Messages

  • I'm using windows 7, trying to download pictures from my canon 5d mark 2, but when I click import, the camera does not appear. I've tried changing USB ports, switching the camera on and off, trying a different USB cord, tried a different camera, but nothi

    I'm using windows 7, trying to download pictures from my canon 5d mark 2, but when I click import, the camera does not appear. I've tried changing USB ports, switching the camera on and off, trying a different USB cord, tried a different camera, but nothing. Please help! This problem only started a few days ago on lightroom 3.6, upgraded to 5.5, but still not working. Thanks.

    Can you see the Canon EOS camera and image files using Windows Explorer? If not disconnect the camera, close all applications' shutdown Windows, and TURN OFF the power to your system and ALL connected devices. Disconnect all phones, iPads, and any other USB devices and restart your system.
    Retry Windows Explorer and see if your camera is showing. If so try LR import again.

  • Cannot send email. When I click Write the window does not open properly. Does not have the "send, spelling, attach security save" line.

    Cannot send email. When I click Write the window does not open properly. Does not have the "send, spelling, attach, security, save line there. Then when I click File, then Send now it will not send. A message comes up saying my SMTP server failed. Have check and everything appears to be o.k.

    Hi Stephen,
    What version of MS Office are you using?
    Are you facing the issue similar to that mentioned here: Acrobat/Reader: Attach to Email button not working for PDFs referenced from long URLs
    Open Acrobat. Use the click-path Edit - Preferences - select the Category "Email Accounts". In the dialog there is the "Add Account" drop-down. Select "Add Other". The "Add Webmail Account" dialog presents. You'll fill out the dialog's fields with Outlook.com settings. (don't forget the "Advance Settings" button)
    From a look-see on the web it appears that the following are the needed settings. BUT, you'll be wanting to validate.
    The Outlook.com SMTP server settings for sending outgoing messages from an email program on desktop, cell phone or mobile device are:
    • Outlook.com SMTP server address: smtp.live.com
    • Outlook.com SMTP user name: Your full Outlook.com email address (not an alias)
    • Outlook.com SMTP password': Your Outlook.com password
    • Outlook.com SMTP port: 587
    • Outlook.com SMTP TLS/SSL encryption required: yes
    For incoming messages from an Outlook.com account to an email program using POP, use the Windows Live Hotmail POP3 server settings.
    The Outlook.com POP server settings for downloading new incoming messages to email program, cell phone or mobile device are:
    • Outlook.com POP server address: pop3.live.com
    • Outlook.com POP user name: Your full Outlook.com email address (not an alias)
    • Outlook.com POP password: Your Outlook.com password
    • Outlook.com POP port: 995
    • Outlook.com POP TLS/SSL encryption required: yes
    Regards,
    Rave

  • I have a new iMac with osx 10.8.3 i can not get my hp laserjet m1522nf scanner to work. The printer works but when in scanner mode the scanner does not show up

    I have a new iMac with osx 10.8.3 i can not get my hp laserjet m1522nf scanner to work. The printer works but when in scanner mode the scanner does not show up.I tried to install the newest hp driver for the printer but when I install the computer ca not find the printer.

    Repair permissions and restart your computer.
    Make sure you have the updated scanner drivers installed. 
    Install the gimp drivers:  http://gimp-print.sourceforge.net/MacOSX.php 
    http://support.apple.com/kb/PH11070 OS X Mountain Lion: Troubleshoot a network printer 
    http://support.apple.com/kb/PH11143 OS X Mountain Lion: Reset the printing system
    http://support.apple.com/kb/HT3669 Printer and scanner software available for download
    What to do when you can't print

  • Recently when I install apps, the icon does not appear on the menu screen, also, it shows that it is down loading at the app store and when complete, I can not open it or reinstall it.  Help Please   o,

    Recently when I install apps, the icon does not appear on the menu screen, also, it shows that it is downloading at the app store and when complete, I can not open it or reinstall it. Has happened on the last 4 free apps. Help Please

    Reset your iPad. Press and hold both the power and home buttons for 10-15 seconds till the Apple logo appears. Release both buttons. Wait 15-20 seconds till you iPad starts on it's own. Now try and download an app.

  • Data changes but the Chart does not

    The xml data changes every few minutes, and I want the chart
    to display the changes, but I do not know how. I added a button
    that refreshes the data, but the chart does not update. Can anyone
    help sync the two of the up and even better automatically?

    "CR_COOL" <[email protected]> wrote in
    message
    news:g8p670$jt1$[email protected]..
    > The xml data changes every few minutes, and I want the
    chart to display
    > the
    > changes, but I do not know how. I added a button that
    refreshes the data,
    > but
    > the chart does not update. Can anyone help sync the two
    of the up and even
    > better automatically?
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > layout="absolute" width="499" height="369"
    > backgroundGradientAlphas="[1.0,
    > 1.0]"
    > backgroundGradientColors="[#FCFCFC, #FCFCFC]"
    > creationComplete="srv.send()">
    This is the only place you ask the server for information
    ^
    HTH;
    Amy

  • I have the doc on my screen as an adobe  but I cannot make changes?  The browser does not locate it?

    I have the doc on my screen as an adobe  but I cannot make changes?  The browser does not locate it?

    Hi,
    Are you opening a PDF file in browser and trying to edit the PDF file there?
    Please let me know in more details.
    In general most PDF files cannot be edited in browser and some PDF can be edited with the permission for editing in browsers.
    Thank you.
    Hisami

  • I'm trying to send a message from my new MacBook Air, I can type the message but when I hit enter the message does not go?

    I'm trying to send a text message from my new MacBook Air, I can type the message but when I hit enter the message does not go.

    Have you addressed the message to someone?  Is that address capable of receiving text messages?
    What happens when you hit enter?

  • Why is it that when I text pictures, the recipient does not receive them.  I've noticed that I have a camera roll which is where I choose pics from, but nothing in Photo Stream.  Can someone please let me know what the issue might be?  Thank you!

    Why is it that when I text pictures, the recipient does not receive them.  I've noticed that I have a camera roll which is where I choose pics from, but nothing in Photo Stream.  Can someone please let me know what the issue might be?  Thank you!

    Some phones can only send and recieve SMS messages. If the recipients phone doesn't support MMS they won't be able to recieve a text with a photo.
    To get your photos in Photo Stream, you'll need to setup iCloud. Check out this Apple article for more info -> iCloud: Photo Stream FAQ

  • When selecting a website the website does not load, I keep going back to my home page?

    If I receive a message to my mailbox and there is a link within the message, the url does not load. It does open FireFox but goes to my home page on Firefox.

    BY removing avg toolbar from your firefox adds-on should remove this problem

  • Book editing - change a photo, book does not update

    We are having a small problem. When editing our book, we double on some photos to edit them. Crop, color adjust, etc. Then we click done, and get sent back to our Book page.
    Now about half the time the book preview does not update the image that we just changed. It seems to update the larger full page images more often than it updates the smaller images in the book layout. If I double click the photo again, I can see the change I previously made are still there, but they are not being reflected in the book preview.
    So 2 questions, how do I force the book to update its photo preview? And if I print this will it use the edited photo, and not the version its showing me in the preview?
    Assume this is just a screen display issue, and that the generated print will use the right assets, right?
    This is in iLife '08 on Leopard on an intel Macbook.

    Squeegy:
    Welcome to the Apple Discussions. Try changing the layout, i.e. from frames with or without text to the other and then back. That may jump start the picture to display properly. It works for me when I do some cropping, like from landscape to portrait and the frame doesn't reset itself.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • When i go onto mail it does not update

    when i try to use mail is does not update why it says pop3 server cannot be found

    maddog76oki wrote:
    That is the problem. It goes to a page where you can change the color or scrolling.
    You're looking in the wrong place. You're in the System Preferences, and you need to be in the Safari preferences, if that's the web browser you're using. You find these preferences under the Safari application menu, which will be under the "Safari" name just to the right of the Apple menu.
    Regards.

  • I now use Firefox, but not sure which product number. Mozilla has been automatically downloading an update. When it is downloaded, the browser does not work. I keep having to restore the computer, and before long you download again. Help.

    I'd like to stop the automatic downloads number one.
    I'd also like a possible explanation as to why the new version will not work. I know that Microsoft downloaded a bunch of changes (12) that also seemed to screw up my computer. I have switched off their automatic downloads.

    To stop Auto updates use: '''Tools -> Options -> Advanced -> Update Tab ''' <br> select the options you require ( see [[Updating Firefox]] )
    As for why your version does not work I do not know but suggest you look at:
    * [[Safe Mode]] Note when using safe mode do not make changes on the first dialogue Window you see; click the Continue button
    * [[Basic Troubleshooting]]
    You may also need to review the versions of Java see
    * [[Using the Java plugin with Firefox]]
    * "Why do I need Java 6 Update 10 and above for Firefox 3.6 and later versions? " - http://www.java.com/en/download/faq/firefox_newplugin.xml
    Your System details show you as using version 3.6.12 of Firefox, that is not the latest version, it would be normal practice to update to the latest version, which is why you are being offered the updates. See also [[Software Update Failed]]

  • When I push play the video does not play.

    I have PP 2014. When I push play the video sometimes does not play. I just read here that the July 10th update may fix this, but the update keeps failing. Do i need to do something special?

    Does your hardware meet the minimum requirements?

  • When iTunes is opened the menu does not appear properly but script does

    for the past 2 months whenever i open my iTunes it opens, however not properly. I am able to see all of my songs in my library but the actual menu does not appear. I have tried reinstalling itunes multiple times as well as reinstalling quicktime. I have no idea what else to try please help!

    Reset your iPad. Press and hold both the power and home buttons for 10-15 seconds till the Apple logo appears. Release both buttons. Wait 15-20 seconds till you iPad starts on it's own. Now try and download an app.

Maybe you are looking for

  • Have a UNMOUNTABLE_BOOT _VOLUME on HP DV4250 Laptop..Help

    Had Unmountable_Boot_Volume Blue screen error ,now laptop keeps recycling the start boot..Help plz

  • Payment Proposal Layout?

    Hi Guru's, When we run the proposal we are using the standard display variant. We want to edit this to add the invoice #, doc #, invoice date and total? Is there any way I can do this ? Also if I change this for one company code will i be changing th

  • Capacity calculation in PM module

    Dear all gurus, Inspite maintaining settings in workcenter,shifts and controlkey , when i make order <b>PM01</b> type and try to check capacity it is giving message <b>No reqmts/caps exists or not relevant to finite scheduling.</b> Along with this al

  • Reply to All - How can I see if there are multiple recipients?

    Just switched to Mail from Entourage. How can I tell if an email sent to me was sent to others as well? It seems the only way is to click on Reply All and see if other addresses are there. In Entourage, Reply All isn't a choice unless there are other

  • Monitor will not turn on with new graphics card

    I have a h8-1070t and added a Powercolor 7870 myst graphics card, but the monitor, keyboard, and mouse will not power on.  I tried this same card in my friends pc, works fine. I have a 600w powersupply and running windows 7 and currently  using an ol