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

[FlexJS] uncaught reference error on known function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Apache FlexJS 0.7.0
    • Apache FlexJS 0.8.0
    • FlexJS
    • None

    Description

      The attached code when run gives this uncaught error:

      EventDispatcher.js:70 Uncaught ReferenceError: callback is not defined
          at Main.initialise (Main.js:79)
          at Main.$EH0 (Main.js:97)
          at Main.goog.events.EventTarget.fireListeners (eventtarget.js:284)
          at Function.goog.events.EventTarget.dispatchEventInternal_ (eventtarget.js:381)
          at Main.goog.events.EventTarget.dispatchEvent (eventtarget.js:196)
          at Main.org.apache.flex.events.EventDispatcher.dispatchEvent (EventDispatcher.js:67)
          at Main.org.apache.flex.core.ElementWrapper.dispatchEvent (ElementWrapper.js:214)
          at Main.org.apache.flex.core.Application.initialize (Application.js:80)
          at Main.org.apache.flex.core.Application.start (Application.js:279)
          at index.html:78
      Main.initialise @ Main.js:79
      Main.$EH0 @ Main.js:97
      goog.events.EventTarget.fireListeners @ eventtarget.js:284
      goog.events.EventTarget.dispatchEventInternal_ @ eventtarget.js:381
      goog.events.EventTarget.dispatchEvent @ eventtarget.js:196
      org.apache.flex.events.EventDispatcher.dispatchEvent @ EventDispatcher.js:67
      org.apache.flex.core.ElementWrapper.dispatchEvent @ ElementWrapper.js:214
      org.apache.flex.core.Application.initialize @ Application.js:80
      org.apache.flex.core.Application.start @ Application.js:279
      (anonymous) @ index.html:78
      

      This can be fixed by change the code to:

              public function initialise():void
              {
                panel.callback = this.callback;
              }
      

      Attachments

        1. Panel.mxml
          0.4 kB
          Justin Mclean
        2. Main.mxml
          0.7 kB
          Justin Mclean

        Activity

          People

            aharui Alex Harui
            jmclean Justin Mclean
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: