Text not initialized, even though Application.creationComplete...?

(I know OOP from Java, but am somewhat new to ActionScript.)
I have a MXML application with this attribute:
<mx:Application
...creationComplete="myMethod(...)"...>
In the Application, I have an <mx:Text> (which sits
inside an <mx:VBox>, which is inside an <mx:ViewStack>,
etc.).
When myMethod(...) is called upon creationComplete, I cannot
get the <mx:Text> by reference: it is null! The problem: the
container VBox.initialized is false.
If I wait a few seconds and click a button that calls
myMethod(...), then the VBox has had time to initialize.
I don't know if this is a bug -- it seems that
creationComplete shouldn't be called until all children of
Application have been initialized. Or perhaps Flex 3 uses "lazy
initialization"? Anyway...
MY PROBLEM: I want to delay execution of myMethod(...) until
the VBox is initialized.
How to do this? In Java, I would do something like, "while
(myText.initialized == false) try {Thread.sleep(500);}..."
Any ideas how to wait for (or force) full initialization?

"iamoj" <[email protected]> wrote in message
news:g6ok6k$ekg$[email protected]..
> (I know OOP from Java, but am somewhat new to
ActionScript.)
>
> I have a MXML application with this attribute:
> <mx:Application
...creationComplete="myMethod(...)"...>
>
> In the Application, I have an <mx:Text> (which
sits inside an <mx:VBox>,
> which is inside an <mx:ViewStack>, etc.).
>
> When myMethod(...) is called upon creationComplete, I
cannot get the
> <mx:Text>
> by reference: it is null! The problem: the container
VBox.initialized is
> false.
>
> If I wait a few seconds and click a button that calls
myMethod(...), then
> the
> VBox has had time to initialize.
>
> I don't know if this is a bug -- it seems that
creationComplete shouldn't
> be
> called until all children of Application have been
initialized. Or perhaps
> Flex
> 3 uses "lazy initialization"? Anyway...
>
> MY PROBLEM: I want to delay execution of myMethod(...)
until the VBox is
> initialized.
>
> How to do this? In Java, I would do something like,
"while
> (myText.initialized
> == false) try {Thread.sleep(500);}..."
>
> Any ideas how to wait for (or force) full
initialization?
>
You could call the method on creationComplete of the VBox...
Or, depending on what is going on, you may need to override
commitProperties
or updateDisplayList and call it in one of those places.
HTH;
Amy

Similar Messages

  • Flash Player 10.1 is not installed even though message says it was successful.

    Hello,
    I use W7 Ultimate, 64 bit, and IE 8. Whenever I try to watch video a message says I  need to upgrade Flash Player and gives me a link to version 10.l
    I uninstalled version 10.0.32.18, then downloaded and installed version 10.l. A message says the installation was successful. However, I still get the same message and link whenever I try to watch video. I tried repeatedly with the same results. Each time Update Checker identifies the installed version as 10.0.32.18 even though an Adobe message says the installation of v.10.1 was successful.
    Can anyone help?
    gbsib

    Hi,
    I got rid of Update Notifier, and I use Adobe Acrobat 9 Pro but am not a developer.
    I honestly thought I was following all your instructions to the letter. I skipped some steps in my last post, but here is everything I really did.
    I used the Administrator account, closed all applications, set the Internet security to Medium, put *.adobe.com in Trusted sites and set Internet security to low for it, removed real time protection for my antivirus, used Advanced Settings to disable the firewall, downloaded the Flash Player installer and uninstaller to the Desktop, disconnected the Internet, and closed all browsers.
    The uninstaller was then run. Then the installer was run. The computer was booted . It was then rebooted. The insaller was run again. The computer was rebooted. The Internet was connected.
    Please look over each step and if I'm skipping something I'll add it before trying again.
    Date: Thu, 17 Jun 2010 09:34:27 -0600
    From: [email protected]
    To: [email protected]
    Subject: Flash Player 10.1 is not installed even though message says it was successful.
    Hi gb, I think that you are relying on this Update checker too much. Early on, you confirmed what Flash files were installed. What the Update Checker reports is not correct, sorry. The proof in the pudding is what Flash Player files are Installed.
    In Post#2, you had the correct Flash files Installed, regardless of what the Update Checker said. I can't use the Update Checker as the Standard on whether you have Flash Player Installed or not and you shouldn't either. This is getting too confusing.
    The only issue you had was the Shockwave Flash Object did not Install and I posted the reasons in Post#6.
    There is a procedure to Uninstall Flash Player and to Install Flash Player and it appears that you are relying on other programs to dictate.
    Also I have never heard of anyone using the Adobe Update Manager for Flash Player. Perhaps you should read up on it and see if you really need it.
    Are you a Developer? My suggestion would be to take a look in Programs and Features via Control Panel and see if all of the Adobe Programs you have Installed are needed. Then check your IE add ons for the same.
    My Post# 6 still stands. Until that is corrected, there is nothing more that can be done. That Update Checker, does is have a website? If it is identifying those 2 files as Flash Player files, then I know I wouldn't be using it and you shouldn't either.
    Regards,
    eidnolb
    >

  • Ripped a CD to iTunes, it is showing up in "My Music" but when I sync with my 80gb Classic the ripped CD is not syncing even though other changes I made are

    Ripped a CD to iTunes, it is showing up in "My Music" but when I sync with my 80gb Classic the ripped CD is not syncing even though other changes I made are
    Have checked device sync settings and it is entire music library and their is plenty of space on ipod to accommodate - have restarted both itunes and the computer and disconnected and reconnected ipod to no avail.
    Running itunes on Window machine under W8.1 and ipod software is 1.12

    Thanks planb77. Your instructions worked but I had to do a little more than you stated. I did not realize that transferring files to a new computer was not enough. When the iPod synced I was told I needed to "authorize" my new computer to get my iTunes purchases to sync to the iPod. So after the initial sync, I ejected and disconnected the iPod, went into the iTunes store, set up "home sharing" and then authorized the new computer. When that was done I reconnected the iPod and was able to sync all my books and music. The only thing I couldn't do was rename the iPod as iTunes never asked me to. Is there a way to rename it after it has been set by iTunes as "owner's iPod"?

  • My macbook won't let me sync music or apps as it says my computer is not authorized, even though when I clicked to authorize it it says that it already is. how do i fix this?

    my macbook won't let me sync music or apps as it says my computer is not authorized, even though when I clicked to authorize it it says that it already is. can anybody tell me how i could fix this? iv already tried unarthorising the computer and re authorising it but it still doesnt seem to work

    Hey CarlyR_,
    Thanks for the question. I understand you are experiencing issues related to iTunes Store authorization. The following resources may help to resolve these issues:
    iTunes repeatedly prompts to authorize computer to play iTunes Store purchases
    http://support.apple.com/kb/TS1389
    iTunes: Missing folder or incorrect permissions may prevent authorization
    http://support.apple.com/kb/TS1277
    Thanks,
    Matt M.

  • After upgrading to Lion Image Capture does not work, even though it is intel software.  Gives error 9931.  What gives?

    After upgrading to Lion, Image Capture does not work, even though it is intel software.  Gives error 9931.  What gives?

    Ouch, if it is indeed damaged, then sadly you need to restore the whole danged huge OS!
    Didn't used to be this way before Lion/10.7.
    Bootup holding CMD+r, or the Option/alt key to boot from the Restore partition & use Disk Utility from there to Repair the Disk, then Repair Permissions.
    If that doesn't help Reinstall the OS.

  • How do I authorize my 100+ previously purchased itunes music that is in protected aac form?  It prompts that my computer is not authorized even though it is.

    How do I authorize my 100+ previously purchased itunes music that is in protected aac form?  It prompts that my computer is not authorized even though it is.

    are you saying that your computer is autharized from guessing, or do you know it is becuase it says it. in itunes, go to the advanced tab and the last option in that tab should be either aurhorize, or de-authorize.  What does it say?

  • I just got my iPod touch, I updated m iTunes and my iPod is still not showing up on iTunes, its giving me the iPod can't be used because the required software is not installed even though my iTunes is up to date

    I just got my iPod touch, I updated my iTunes and my iPod is still not showing up in iTunes. It is telling me the required software is not installed even though my iTunes is up to date

    http://support.apple.com/kb/TS1369
    There have been some problems accessing pages on the Apple web site.  If the hyperlink gives you a "We're sorry" message, try again.

  • HT2953 i-tunes could not be used because the original file could not be found.could not locate.this error occurs on most of my songs in my library and will not play even though they are in my i-pod and play with no trouble.can  anyone please help?

    i-tunes could not be used because the original file could not be found.could not locate.this error occurs on most of my songs in my library and will not play even though they are in my i-pod and play with no trouble.can  anyone please help?

    I was not complete clear.
    Since you never changed the settings in the advanced section of iTunes preferecnes, you have to chech that your music is really in the location setted in the folders reported in the advanced section.  If not you have 2 ways: reset the position of this folders or in the actual disk organisation or in the pointing on the preferences.
    If you press the reset button you just give to itunes its default setting as for the position of the music files: probably this will be a good choice if you have never changed any default preference.
    But before I would check the folders and see if the songs are really there
    In my iTune I have this, and I believe it is the default.
    Users/YOURHOMEFOLDERNAME/Music/iTunes/iTunes Music

  • In mail attachments are not deleted even though mail is deleted

    In mail attachments are not deleted even though mail is deleted

    Check on your server to see what maiul options are selected.  If your mail account is set to "download all attachments automatically", that may be an option you want to de-select.

  • BB Curve 8350 quit email function. Can't load address for email setup..."blank entry not valid" even though info entered

    HELP!!  My BB quit sending/receiving emails 6 weeks ago.  I tried to do the setup again, but error message says "Blank entry not valid" even though the info has been entered (Email & password)   I tried to get help from Sprint but as they aren't supporting BB anymore, they just want me to upgrade. 
    I swapped devices this AM (8350 Black for 8350 Red) and the same issue on this device.  Any assistance is welcome!!!
    Thank you!

    If they cannot resolve your issue ask them to escalate your case to RIM. it is what they are SUPPOSED to do when they cannot resolve a BlackBerry issue. Whoever you have been on the phone with does not know what they are doing.
    This forum is not an official support channel but rather a peer-to-peer support forum community where other users just like yourself help each other out with their BlackBerry device.
    Some things can only be solved by RIM, however, and the only channel to their support is through your carrier.
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • In the middle of an update, it call closed. Itunes keeps saying that it's not installed, even though ive tried reinstalling multiple times. All my iphone is doing it showing the ituns symbol and a charger. How can I fix this???

    In the middle of an update, it call closed. Itunes keeps saying that it's not installed, even though ive tried reinstalling multiple times. All my iphone is doing it showing the ituns symbol and a charger. How can I fix this???

    Hi lepyykko,
    If I understand your question, you are trying to update your iPhone, but you are seeing an error message that iTunes for Windows is not installed, is that right?  The first step is to get iTunes successfully installed on your computer.  Then backup the iPhone before updating the iOS software.
    Are you seeing any error messages when you try to install iTunes for Windows?  
    If you can't install or update iTunes for Windows - Apple Support
    https://support.apple.com/en-us/HT201668
    Are you able to update your iPhone wirelessly?
    Update the iOS software on your iPhone, iPad, and iPod touch - Apple Support
    https://support.apple.com/en-us/HT204204
    Before you update
    Back up your device to iCloud.
    Update your device wirelessly
    The easiest way to update your device is wirelessly, also called “over the air.” Here’s how:
    Plug in your device to a power source.
    Tap Settings > General > Software Update.
    Tap Download and Install. Updates might download automatically while your device is connected to Wi-Fi and a power source.
    Tap Install, or tap Later to install the update later. If you use a passcode, you'll need to enter it before installing the update.
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    https://support.apple.com/en-us/HT201263
    I hope this information helps ....
    - Judy

  • Server stating client not connected even though it is on

    We often have trouble where the server will state the computer is not connected even though it is on. Sometimes restarting the local service will cause the server to see it connected again. Most time we need to reboot the machine altogether.
    Is there a way to force the server to recheck if the computer is connected. A command on the server or the remote pc?

    What setting do you have for how often the Collection Client checks in? Default is 180min and that time differential could be your gap for when it updates status.
    Just a thought.

  • How much iphone 4s wifi chip cost?Still my 4s wifi is not working even though I already updated it to ios7. Thank You!!!..

    How much iphone 4s wifi chip cost?Still my 4s wifi is not working even though I already updated it to ios7. Thank You!!!..

    You cannot replace just the chip. If all of the various solutions suggested in Apple's support documents and here in these forums do not help, you will need to 1) take or send your iPhone to Apple for replacement, 2) pay to have an unauthorized third-party shop attempt repairs, or 3) attempt repairs yourself. The latter two options will void any further support from Apple.
    Regards.

  • HT4059 Why are books not available even though they appear as search results in Apple Canada iBook Store?

    Why are books not available even though they appear as search results in Apple Canada iBook Store?

    You can only buy from your own country's store - to be able to buy from another country's store you need a valid billing address in that country and be in that country when buying from it. You can try requesting that they be added to US store, but ultimately it's the book's publisher that will have to grant Apple a license to sell it there : http://www.apple.com/feedback/itunes.html
    Are they available in other ebook stores/apps that you have access to e.g. Amazon/Kindle, Nook, Kobo etc ?

  • After upgrading to OS X yosemite my iMovie says not supported even though it has upgraded as well

    I have a Mac Book Pro. I have upgraded to yosemite osx. Imovie has also been upgraded to 10.06 version but when I try to open it says that my 10.2 version is not supported even though my version has been updated. I'm also unable to have automatic updates.

    I would try to delete it and then reinstall it.

Maybe you are looking for

  • Where can I find a download accelerator?

    Okay. I am new to apple so if I ask a stupid questions don't laugh. Anyways I really need a download accelerator. I live in Alaska about 100 miles away from a good internet connection. When using my old microsoft comp. I added the program Download Ac

  • How to Restore my back up without updating to ios8?

    okay, i simply doesnt like ios8, i prefer ios7.0.6, but then my ipad stuck at apple logo, how can i just restore it without even updating

  • Changing States or View Stack?

    Okay, I know this probably sounds ridiculously simple but I can't find any documentation to answer my question. What is the best way to design a four or five "page" project. Each of these "pages" are quite different in layout and content but I'm not

  • How to sign applet on Solaris

    Can somebody help me figure out the applet signing procedure/utility for the solaris platform ASAP. We got the following error message if we try now: When trying to start MainMenu (converted Oracle form) on Solaris from panda using JDK1.3 plug-in, I

  • Imported footnote from word won't be removed in indesign textbox

    I have such an annoying problem! I got a indesign doc from my client, they already imported the text (with styles) from word for me. But now, I keep having problems wit a footnotecontainer  that doesn't want to be deleted from my text box. It stays i