In FlexJS 0.5.0, many JS files are handwritten.  You can tell which ones are 
handwritten because they have the standard Apache header.  Files that were 
cross-compiled say "Generated by Apache Flex Cross-Compiler from …"

We are just completing the "back port" of all of our JS files to AS, so soon in 
the nightly build (0.6.0) all JS files will be generated from AS with 
conditional compilation for SWF-specific or browser-specific code.  One 
advantage of doing that is that more code is shared.  I just looked in the back 
port branch code and that missing check is there for the JS version as well.

So yes, ViewBaseDataBinding.js you are using is handwritten.  I guess you must 
have created an app without any data bindings.

You should be able to monkey-patch FlexJS JavaScript by editing the 
ViewBaseDataBinding.js in frameworks/js/FlexJS/libs.

Thanks for using FlexJS,
-Alex





From: Marcus Fritze 
<marcus.fri...@googlemail.com<mailto:marcus.fri...@googlemail.com>>
Reply-To: "dev@flex.apache.org<mailto:dev@flex.apache.org>" 
<dev@flex.apache.org<mailto:dev@flex.apache.org>>
Date: Friday, December 11, 2015 at 1:32 AM
To: "dev@flex.apache.org<mailto:dev@flex.apache.org>" 
<dev@flex.apache.org<mailto:dev@flex.apache.org>>
Subject: [FlexJS] Code missing in the generated js file?

I am really not sure how flexJS internally works. Is the js code (for example 
the
file ViewBaseDataBinding.js in org.apache.flex.binding) generated from the
as version (ViewBaseDataBinding.as) from the complier OR is the js file 
„handwritten“?


Because there is some little difference.

in the ViewBaseDataBinding.js in initCompleteHandler function the following 
code is missing:


if (!("_bindings" in this._strand))
  return;

before the line

var bindingData = this.strand_._bindings;

This is why I get the following error:

Uncaught TypeError: Cannot read property '0' of undefined
  org.apache.flex.binding.ViewBaseDataBinding.initCompleteHandler
  goog.events.EventTarget.fireListeners
  goog.events.EventTarget.dispatchEventInternal_
  goog.events.EventTarget.dispatchEvent
  childCtor.base
  org.apache.flex.events.EventDispatcher.dispatchEvent
  org.apache.flex.core.ContainerBase.addedToParent
  childCtor.base
  org.apache.flex.core.ViewBase.addedToParent
  org.apache.flex.core.Application.addElement
  org.apache.flex.core.Application.start
  (anonymous function)


Thanks

Marcus

Reply via email to