flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joel Anderson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-35227) [FlexJS] Data Binding Fails When Following Multiple References
Date Thu, 22 Dec 2016 19:59:58 GMT

    [ https://issues.apache.org/jira/browse/FLEX-35227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770958#comment-15770958
] 

Joel Anderson commented on FLEX-35227:
--------------------------------------

I did a quick test with the current nightly build (2016/12/22), and confirmed the behavior:

Compiler output:
{noformat}
host-0653jcamacminiprominicnet:TestFlex35227_Updated joelanderson$ $FLEX_HOME/js/bin/mxmlc
src/TestFlex35227_Updated.mxml 
Using Falcon codebase: /Users/joelanderson/Downloads/MoonshineSDKs/apache-flexjs-nightly-2016-12-22//js/bin/../..
Using Flex SDK: /Users/joelanderson/Downloads/MoonshineSDKs/apache-flexjs-nightly-2016-12-22/
Compiling file: /Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/TestFlex35227_Updated.js
Compiling file: /Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/InitialView.js
...
Dependencies calculated for '/Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/ClassA.js'
Dependencies calculated for '/Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/ClassB.js'
Dec 22, 2016 1:54:49 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: /Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/InitialView.js:200:
WARNING - Parse error. extra visibility tag
  * @private
    ^

Dec 22, 2016 1:54:49 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 0 error(s), 1 warning(s), 96.9% typed
The project 'TestFlex35227_Updated' has been successfully compiled and optimized.
{noformat}


Browser console (MacOS Firefox).  This triggers when changing the value in the second column.
{noformat}
TypeError: this.anyClass.fieldB is undefined[Learn More]  InitialView.js:194:3
	InitialView.prototype.onTextInputChangeB file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/InitialView.js:194:3
	InitialView.prototype.$EH1 file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/InitialView.js:233:3
	bound  self-hosted
	goog.events.fireListener file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/library/closure/goog/events/events.js:730:10
	org.apache.flex.core.ElementWrapper.fireListenerOverride file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/org/apache/flex/core/ElementWrapper.js:44:10
	goog.events.handleBrowserEvent_ file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/library/closure/goog/events/events.js:856:10
	goog.events.getProxy/f< file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/library/closure/goog/events/events.js:278:16
	org.apache.flex.core.ElementWrapper.prototype.dispatchEvent file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/org/apache/flex/core/ElementWrapper.js:212:10
	org.apache.flex.html.TextInput.prototype.textChangeHandler file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/org/apache/flex/html/TextInput.js:55:5
	bound  self-hosted
	goog.events.fireListener file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/library/closure/goog/events/events.js:730:10
	org.apache.flex.core.ElementWrapper.fireListenerOverride file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/org/apache/flex/core/ElementWrapper.js:44:10
	goog.events.handleBrowserEvent_ file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/library/closure/goog/events/events.js:856:10
	goog.events.getProxy/f< file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35227_Updated/bin/js-debug/library/closure/goog/events/events.js:278:16
{noformat}


> [FlexJS] Data Binding Fails When Following Multiple References
> --------------------------------------------------------------
>
>                 Key: FLEX-35227
>                 URL: https://issues.apache.org/jira/browse/FLEX-35227
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache FlexJS 0.8.0
>            Reporter: Devsena
>         Attachments: POCSource.zip
>
>
> Bracketed data binding to UI component do not works properly in FlexJS 0.8.0 nightly
build SDK (my tests were mainly concentrated to HTML output in browsers). 
> *Works*
> {code}
> <js:Label id="lbl" text="{anyClass.fieldA}" width="300"/>
> {code}
> *Do not works*
> {code}
> <js:Label text="{anyClass.fieldB.fieldC}" width="300"/>
> {code}
> Binding to UI component seems do not works when there are multiple reference, i.e. _class.field.field_.
Following are the snippets of the codes which I used in this test:
> *InitialView MXML file*
> {code}
> [Bindable] private var anyClass:ClassA = new ClassA();
> protected function onTextInputChangeA(event:org.apache.flex.events.Event):void
> {
> 	anyClass.fieldA = myTI1.text;
> }
> 			
> protected function onTextInputChangeB(event:org.apache.flex.events.Event):void
> {
> 	anyClass.fieldB.fieldC = myTI2.text;
> }
> ...
> <js:VContainer width="500">
> 	...
> 	<js:TextInput id="myTI1" text="Change Value.." change="onTextInputChangeA(event)"/>
> 	<js:Label id="lbl" text="{anyClass.fieldA}" width="300"/>
> </js:VContainer>
> <js:VContainer width="500">
> 	...
> 	<js:TextInput id="myTI2" text="Change Value.." change="onTextInputChangeB(event)"/>
> 	<js:Label text="{anyClass.fieldB.fieldC}" width="300"/>
> </js:VContainer>
> {code}
> *ClassA*
> {code}
> public class ClassA extends EventDispatcher
> {
> 	[Bindable] public var fieldB:ClassB = new ClassB("Change Value..");
> 		
> 	public function ClassA() { }
> 	
> 	private var _fieldA:String = "Change Value..";
> 	[Bindable("fieldAChanged")]
> 	public function get fieldA():String
> 	{
> 		return _fieldA;
> 	}
> 		
> 	public function set fieldA(value:String):void
> 	{
> 		if (value != _fieldA)
> 		{
> 			_fieldA = value;
> 			dispatchEvent(new Event("fieldAChanged"));
> 		}
> 	}
> }
> {code}
> *ClassB*
> {code}
> [Bindable] public class ClassB extends EventDispatcher
> {
> 	public function ClassB(fieldC:String)
> 	{
> 		this.fieldC = fieldC;
> 	}
> 		
> 	private var _fieldC:String;
> 		
> 	[Bindable(event="fieldCChanged")]
> 	public function get fieldC():String
> 	{
> 		return _fieldC;
> 	}
> 		
> 	public function set fieldC(value:String):void
> 	{
> 		if (value != _fieldC)
> 		{
> 			_fieldC = value;
> 			dispatchEvent(new Event("fieldCChanged"));
> 		}
> 	}
> }
> {code}
> I've attached herewith the source to the test project. Please, take a look.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message