Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-20314

Quiet failure when accessing uninitialized component

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK Previous
    • None
    • States
    • None
    • Affected OS(s): Mac
      Affected OS(s): Mac OS 10.5
      Language Found: English

    Description

      So you have an Adobe Flex application that uses GUI states. You get back to it after a longer period, and you need to fine-tune details. You need to set initial properties of some GUI controls for some situations. You already had an initialization function, so you just do it there. Then you run it, and the code just stops where you changed it. No error and no execution. You try the debug SWF player, same thing.

      That's when you access a GUI control, which wasn't created yet. It happens if your control is added in a GUI state, but the component didn't enter that state yet. Like if in the following you want to set contactMe.selected before you switch your component to "extendedForm".

      <mx:states>
      <mx:State name="extendedForm">
      <mx:AddChild position="lastChild">
      <mx:CheckBox id="contactMe" x="10" y="216" label="Would you like us to contact you about our new products? Maximum 4 times a year." />
      </mx:AddChild>
      </mx:State>
      </mx:states>

      Adobe Flex or SWF player should really report this as a null exception or some other meaningful error.

      SWF player MAC 10,0,12,36, non-debug
      Flex builder 2.0.1

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: