apache / apache/royale-asjs

fx:Binding of variables (non-property) throws exception

Open
#1,159 0 comments 0 reactions 1 assignee Claimed by @greg-dove View on GitHub
Dominant language
ActionScript
Stars
380
Forks
120
PR merge metrics
No merged PRs in 30d

Description

Using variables (non-property) in fx:Binding causes exception on JS side. (SWF is fine, and compiling in Flex is fine.)

It looks like properties and functions and xml and other things are expected in fx:Binding on the JS side, but not directly using variables like Boolean or String or int.

(Based on other testing) In org.apache.royale.binding.DataBindingBase.decodeWatcher(), type = 5 for the problem bindings.

If you use only one of the labels, the problem doesn't show up. But with the two labels, plus the fx:Binding, then watchers.length == 3, and the last watcher has null bindings.

See attached example; exception thrown during load on JS side. If you use the commented-out sections (which use properties), instead, then it loads fine
[TestFXBindingNonProperty.mxml.txt](https://github.com/apache/royale-asjs/files/7448539/TestFXBindingNonProperty.mxml.txt)
.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.