Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7766493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:25:58+00:00 2026-06-01T15:25:58+00:00

I am trying to use a button in my init() method. <?xml version=1.0 encoding=utf-8?>

  • 0

I am trying to use a button in my init() method.

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark" title="Test"
        creationComplete="init()">

Now when I try to do something with my button I get the error mentioned. I am assuming maybe it has not loaded yet?

function init():void{
     myButton.thisorthat == makes the error.
}

*EDIT**
The button is created in MXML btw
Not that it matters, but this is for a flex mobile app.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:25:59+00:00Added an answer on June 1, 2026 at 3:25 pm

    Actually it does matter. One thing about NavigatorContent (assuming your children are a subset of one of these types of containers) to remember along with their halo counterparts is they all have a content creation policy set to deferred – meaning it creates the parent most layer of the view / viewstack, but not it’s children until the user has actually navigated to that particular child. One cheat is to set the policy to ‘ALL’, but the better way is to actually listen for the FlexEvent.CONTENT_CREATION_COMPLETE instead (this is broadcast from the child of the navigation container).

    Eg:

    <halo:ViewStack id="setupStack" width="100%" height="100%">
        <api:FileSelector width="100%" height="100%" owner="{this}" 
                          enumerationMode="{FileSystemEnumerationMode.DIRECTORIES_ONLY}"
                          hint="{networkDbAccessHint}" />
        <!- this is valid, but not it's children until contentCreateComplete is fired -->
        <api:DataImport width="100%" height="100%" owner="{this}" />
    </halo:ViewStack>
    

    Both ‘FileSelector’ and ‘DataImport’ broadcast the event (extends s:NavigatorContent).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use $(button).button(); but jquery-ui-1.8.16.custom.min.js used by SlickGrid doesn't have the button
Question I am trying to use a button to delete the first entry to
In a Ruby on Rails form, I'm trying to use a button instead of
I'm trying to use MultiDataTriggers to enabled/disable a button based on the value of
I'm trying to use a sound callback function to show a button once my
I am trying to use some action when I click button in navigation controller.
I am trying to use the element ID of a button on a webpage
I'm trying to use jQuery to change the value of button.kill . However I
I'm trying to use pyqt to show a custom QDialog window when a button
I'm trying to use SDK Facebook to detect the click on the button like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.