You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2019/12/23 12:24:36 UTC

[GitHub] [royale-asjs] piotrzarzycki21 opened a new issue #639: Binding doesn't work in Jewel List item renderers using VO

piotrzarzycki21 opened a new issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639
 
 
   In a simple case where I have Jewel List which is being feed by ArrayList of VO Binding in item renderers doesn't work. Following scenario is presented in attached example:
   1) I have [Bindable] VO which is being displayed in the list
   2) I have following item renderer: 
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <j:ListItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
   		  			 xmlns:j="library://ns.apache.org/royale/jewel" xmlns:js="library://ns.apache.org/royale/basic">
   	<fx:Script>
   		<![CDATA[
   			[Bindable("dataChange")]
               public function get someVO():SomeVO
               {
                   return data as SomeVO;
               }
   		]]>
   	</fx:Script>
   	<j:beads>
   		<js:ItemRendererDataBinding />
   	</j:beads>
   	
   	<j:HGroup percentWidth="100" percentHeight="100"
   	 	itemsHorizontalAlign="itemsCentered" itemsVerticalAlign="itemsCentered">
   		<j:Label text="{someVO.itemQuantity}" percentWidth="100"/>
   	</j:HGroup>
   </j:ListItemRenderer>
   ```
   3) I'm changing itemQuantity property in other view:
   ```
   var tmpVO:SomeVO = someItems.getItemAt(0) as SomeVO;
   tmpVO.itemQuantity += 1;
   ```
   
   Value is not changing in the list. In my opinion it should.
   
   [NewJavaScriptBrowserProject.zip](https://github.com/apache/royale-asjs/files/3994889/NewJavaScriptBrowserProject.zip)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-568587564
 
 
   I have made interesting observation. In our project I'm using following workaround to have it working:
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <j:ListItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
   		  			 xmlns:j="library://ns.apache.org/royale/jewel" xmlns:js="library://ns.apache.org/royale/basic">
   	<fx:Script>
   		<![CDATA[
   			[Bindable("dataChange")]
               public function get someVO():SomeVO
               {
                   return data as SomeVO;
               }
   
   			override public function set data(value:Object):void
   			{
   				if (super.data != value && super.data)
   				{
   					super.data.removeEventListener(ValueChangeEvent.VALUE_CHANGE, onDataChange);
   				}			
   				super.data = value;
   				
   				if (super.data)
   				{
   					super.data.addEventListener(ValueChangeEvent.VALUE_CHANGE, onDataChange);
   				}	
   			}
   			
   			private function onDataChange(event:ValueChangeEvent):void
   			{
   				itemQuantity.text = String(someVO.itemQuantity);
   			}
   		]]>
   	</fx:Script>
   	<j:beads>
   		<js:ItemRendererDataBinding />
   	</j:beads>
   	
   	<j:HGroup percentWidth="100" percentHeight="100"
   	 	itemsHorizontalAlign="itemsCentered" itemsVerticalAlign="itemsCentered">
   		<j:Label localId="itemQuantity" text="{someVO.itemQuantity}" percentWidth="100"/>
   	</j:HGroup>
   </j:ListItemRenderer>
   ```
   
   If my VO has `[Bindable]` on top of it `ValueChangeEvent.VALUE_CHANGE` is not being dispatched, so listener `onDataChange `is not called.
   ```
           [Bindable]
   	public class SomeVO  
   	{
           }
   ```
   
   If VO has `[Bindable]` on top on every property everything is working fine and `onDataChange` has been called.
   
   ```
   	public class SomeVO  
   	{
   		public function SomeVO()
   		{
   		}
   			
   		private var _itemQuantity:int = 1;
   		
   		[Bindable]
   		public function get itemQuantity():int
   		{
   			return _itemQuantity;
   		}
   
   		public function set itemQuantity(value:int):void
   		{
   			_itemQuantity = value;
   		}
   	}
   ```
   
   Note that this change on VO won't fix original issue - I checked that. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-568553297
 
 
   > I'll be afk for about 4-5 days, but can look into this when I'm back if you want. Feel free to assign to me if no-one else gets to it.
   
   @greg-dove I would love to dive into data binding again some day, but this definitely not an issue which I could find cycles. I'm occupied with several other activities. I will probably have some workaround for that and move forward, but fix for this would be awesome. Thank you! 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-568552410
 
 
   > {someVO ? someVO.itemQuantity : ''}
   
   @carlosrovira Unfortunately this didn't help. Thanks! 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-569518504
 
 
   A bit of an update to that issue. We have changed item renderer from example to following one:
   <?xml version="1.0" encoding="utf-8"?>
   ```
   <j:ListItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
   		  			 xmlns:j="library://ns.apache.org/royale/jewel" 
   		            xmlns:js="library://ns.apache.org/royale/basic">
   	<fx:Script>
   		<![CDATA[
   			[Bindable("valueChange")] // <-- NOTE: Replaced 'dataChange' with 'valueChange'
               public function get someVO():SomeVO
               {
                   return data as SomeVO;
               }
   		]]>
   	</fx:Script>
   	<j:beads>
   		<js:ItemRendererDataBinding />
   	</j:beads>
   	
   	<j:HGroup percentWidth="100" percentHeight="100"
   	 	itemsHorizontalAlign="itemsCentered" itemsVerticalAlign="itemsCentered">
   		<j:Label localId="itemQuantity" text="{someVO.itemQuantity}" percentWidth="100"/>
   	</j:HGroup>
   </j:ListItemRenderer>
   ```
   
   Everything started to work. Please look into `Bindable `tag of property `someVO`. 
   
   Additionally in attached example we have following code, where someItems is an ArrayList. 
   ```
   someItems = new ArrayList();
   someItems.addItem(new SomeVO());
   ```
   Above doesn't work for some reason as well - I will try to look into that part. When I have changed it to:
   `someItems = new ArrayList([new SomeVO()]); `
   
   It feeds list properly and along with item renderer changes everything started to properly work.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] carlosrovira commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-568695682
 
 
   Hi Piotr,
   I proposed that change since when fixing all blog examples I notice the List example with ItemRenderer example was failing. The item renderers was showing with no text in the labels. I was able to fix in that way. 
   Anyway, that seemed to me like a workaround an something to fix in bindings, but ws hoping it'll help your case.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] greg-dove commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
greg-dove commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-568536926
 
 
   I'll be afk for about 4-5 days, but can look into this when I'm back if you want. Feel free to assign to me if no-one else gets to it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-568461654
 
 
   @greg-dove @carlosrovira do you experience such issue in your project ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-569518541
 
 
   > If my VO has `[Bindable]` on top of it `ValueChangeEvent.VALUE_CHANGE` is not being dispatched, so listener `onDataChange `is not called.
   > 
   > ```
   >         [Bindable]
   > 	public class SomeVO  
   > 	{
   >         }
   > ```
   > 
   > If VO has `[Bindable]` on top on every property everything is working fine and `onDataChange` has been called.
   > 
   > ```
   > 	public class SomeVO  
   > 	{
   > 		public function SomeVO()
   > 		{
   > 		}
   > 			
   > 		private var _itemQuantity:int = 1;
   > 		
   > 		[Bindable]
   > 		public function get itemQuantity():int
   > 		{
   > 			return _itemQuantity;
   > 		}
   > 
   > 		public function set itemQuantity(value:int):void
   > 		{
   > 			_itemQuantity = value;
   > 		}
   > 	}
   > ```
   > 
   > Note that this change on VO won't fix original issue - I checked that.
   
   That part still remains as issue. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] javeiga-iest edited a comment on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
javeiga-iest edited a comment on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-578806808
 
 
   Hi all,
   We had that same problem when binding lists.
   
   This has worked for us:
     ```
   private var _arrayListExample:ArrayList = new ArrayList();
   [Bindable(event="arrEvent")]
   public function get arrayListExample():ArrayList
   {
      return _arrayListExample;
   }
   public function set arrayListExample(value:ArrayList):void{ 
      _arrayListExample = value; 
      dispatchEvent(new Event("arrEvent"));
   }
   ```
   We add an event to the bindable statement and we call it when making a set.
   
   Keep in mind if you want it to work, you should update the content of the list always by calling the setter and not referring to the private variable of the property.
   
   I hope it helps to you ;)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] carlosrovira closed issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
carlosrovira closed issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] carlosrovira commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-568489499
 
 
   Hi Piotr,
   
   can you try to change binding for this: `text="{someVO ? someVO.itemQuantity : ''}"` and let me know if that fixes binding?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-569614585
 
 
   Final thoughts about that. It looks like we do have working Binding in item renderers, but understanding  trough available examples is not necessary helpful. It depends of what we would like to observe in our itemrenderer.
   1) Observe only setup of `data` property do:
   
   ```
   [Bindable("dataChange")]
   public function get someVO():SomeVO
   {
        return data as SomeVO;
   }
   ```
   
   2) Observe how properties in value object is changing do:
   ```
   [Bindable("valueChange")]
   public function get someVO():SomeVO
   {
         return data as SomeVO;
   }
   ```
   
   Note that even if we decided that there is no issue with that, there is still bug -> https://github.com/apache/royale-asjs/issues/639#issuecomment-569518541
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-569627139
 
 
   > Final thoughts about that. It looks like we do have working Binding in item renderers, but understanding trough available examples is not necessary helpful. It depends of what we would like to observe in our itemrenderer.
   > 
   > 1. Observe only setup of `data` property do:
   > 
   > ```
   > [Bindable("dataChange")]
   > public function get someVO():SomeVO
   > {
   >      return data as SomeVO;
   > }
   > ```
   > 
   > 1. Observe how properties in value object is changing do:
   > 
   > ```
   > [Bindable("valueChange")]
   > public function get someVO():SomeVO
   > {
   >       return data as SomeVO;
   > }
   > ```
   > 
   > Note that even if we decided that there is no issue with that, there is still bug -> [#639 (comment)](https://github.com/apache/royale-asjs/issues/639#issuecomment-569518541)
   
   The question is how to handle both cases ? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] carlosrovira commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-569672462
 
 
   Hi Piotr,
   
   all your findings seems to me very interesting. I wasn't aware about `valueChange`. Don't know if having `dataChange` and `valueChange` is something done by design. Maybe Alex can throw more light on this.
   
   Trying to search about it, I saw there's the following configurations in Basic and Jewel:
   
   ```xml
   <binding-value-change-event>org.apache.royale.events.ValueChangeEvent</binding-value-change-event>
   		<binding-value-change-event-kind>org.apache.royale.events.ValueChangeEvent</binding-value-change-event-kind>
   		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
   ```
   
   But I think we need here @aharui let us know about implications with both `dataChange` and `valueChange` and about configuration.
   
   About the Binding issue:  Your configuration for VOs are the same like in Tour De Jewel right?. There all VOs has `Binding` metadata at level class and are working, right?  Maybe there's a difference within TDJ and you example, but don't see it right now.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] javeiga-iest commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
javeiga-iest commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-578806808
 
 
   Hi all,
   We had that same problem when binding lists.
   
   This has worked for us:
     ```
   private var _arrayListExample:ArrayList = new ArrayList();
   [Bindable(event="arrEvent")]
   public function get arrayListExample():ArrayList
   {
      return _arrayListExample;
   }
   public function set arrayListExample(value:ArrayList):void{ 
      _arrayListExample = value; 
      dispatchEvent(new Event("arrEvent"));
   }
   ```
   We add an event to the bindable statement and we call it when making a set.
   
   Keep in mind that you want it to work, you should update the content of the list always by calling the setter and not referring to the private variable of the property.
   
   I hope it helps to you ;)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] carlosrovira commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-579374581
 
 
   Hi Jaiver, not sure 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] carlosrovira edited a comment on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
carlosrovira edited a comment on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-579374581
 
 
   Hi Jaiver, not sure if that applies to the thread, Have you tried to just use this:
   
   ```
   [Bindable(event="arrEvent")]
   private var arrayListExample:ArrayList = new ArrayList();
   ```
   
   compiler should generate getter/setter and dispatch the `arrEvent` directly.
   
   Anyway, all this is right and I think not related to the other problems Piotr stated. Maybe I'm wrong.
   
   Thanks

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] carlosrovira edited a comment on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
carlosrovira edited a comment on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-579374581
 
 
   Hi Jaiver, not sure if that applies to the thread, Have you tried to just use this:
   
   ```
   [Bindable(event="arrEvent")]
   public var arrayListExample:ArrayList = new ArrayList();
   ```
   
   compiler should generate getter/setter and dispatch the `arrEvent` directly.
   
   Anyway, all this is right and I think not related to the other problems Piotr stated. Maybe I'm wrong.
   
   Thanks

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 opened a new issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 opened a new issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639
 
 
   In a simple case where I have Jewel List which is being feed by ArrayList of VO Binding in item renderers doesn't work. Following scenario is presented in attached example:
   1) I have [Bindable] VO which is being displayed in the list
   2) I have following item renderer: 
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <j:ListItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
   		  			 xmlns:j="library://ns.apache.org/royale/jewel" xmlns:js="library://ns.apache.org/royale/basic">
   	<fx:Script>
   		<![CDATA[
   			[Bindable("dataChange")]
               public function get someVO():SomeVO
               {
                   return data as SomeVO;
               }
   		]]>
   	</fx:Script>
   	<j:beads>
   		<js:ItemRendererDataBinding />
   	</j:beads>
   	
   	<j:HGroup percentWidth="100" percentHeight="100"
   	 	itemsHorizontalAlign="itemsCentered" itemsVerticalAlign="itemsCentered">
   		<j:Label text="{someVO.itemQuantity}" percentWidth="100"/>
   	</j:HGroup>
   </j:ListItemRenderer>
   ```
   3) I'm changing itemQuantity property in other view:
   ```
   var tmpVO:SomeVO = someItems.getItemAt(0) as SomeVO;
   tmpVO.itemQuantity += 1;
   ```
   
   Value is not changing in the list. In my opinion it should.
   
   [NewJavaScriptBrowserProject.zip](https://github.com/apache/royale-asjs/files/3994889/NewJavaScriptBrowserProject.zip)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-569673778
 
 
   > About the Binding issue: Your configuration for VOs are the same like in Tour De Jewel right?. There all VOs has `Binding` metadata at level class and are working, right? Maybe there's a difference within TDJ and you example, but don't see it right now.
   
   I may be completely wrong, but in TDJ all examples are related to option where you setup `data `nothing more. This one:
   
   ```
   [Bindable("dataChange")]
   public function get someVO():SomeVO
   {
        return data as SomeVO;
   }
   ```
   
   If after setup you change any property in SomeVO, which is my case - it won't work cause Binding doesn't know that you have changed anything in SomeVO unless you use `[Bindable("valueChange")]`.
   Even that won't work if you have [Bindable] on top of your class instead on each property -> https://github.com/apache/royale-asjs/issues/639#issuecomment-569518541

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #639: Binding doesn't work in Jewel List item renderers using VO
URL: https://github.com/apache/royale-asjs/issues/639#issuecomment-576011588
 
 
   I would like to report another issue, which may be related somehow to the latest compiler changes - I'm not really sure. We have faced a bit of a blocker with that - which ended with workaround which we are not in favor. I'm not able to prepare simple test case, cause it's rather reproducible in our environment, but I would like to provide some code. I have used build [643](http://apacheroyaleci2.westus2.cloudapp.azure.com:8080/job/royale-asjs_jsonly/643/) of SDK. 
   
   We are getting following exceptions when one of our VO has on top of each property tag `[Bindable]`:
   
   ```
   Uncaught TypeError: this.dispatchEvent is not a function
       at model.vo.DominoPartitionTaskVO.set__label (DominoPartitionTaskVO.js:82)
       at new model.vo.DominoPartitionTaskVO (DominoPartitionTaskVO.js:34)
       at mediator.MediatorDominoPartitionRequest.mediator_MediatorDominoPartitionRequest_updateView (MediatorDominoPartitionRequest.js:245)
       at mediator.MediatorDominoPartitionRequest.onRegister (MediatorDominoPartitionRequest.js:84)
       at org.puremvc.as3.multicore.core.View.registerMediator (View.js:183)
       at ApplicationFacade.org.puremvc.as3.multicore.patterns.facade.Facade.registerMediator (Facade.js:273)
       at controller.CommandRemoveRegisterMainContentView.execute (CommandRemoveRegisterMainContentView.js:45)
       at org.puremvc.as3.multicore.core.Controller.executeCommand (Controller.js:104)
       at org.puremvc.as3.multicore.patterns.observer.Observer.notifyObserver (Observer.js:116)
       at org.puremvc.as3.multicore.core.View.notifyObservers (View.js:123)
   ```
   
   When I have changed and put `[Bindable]` on top of class we are getting different exception:
   
   ```
   base.js:1578 Uncaught TypeError: Cannot read property 'call' of undefined
       at Object.goog.bindNative_ (base.js:1578)
       at Function.org.apache.royale.utils.Language.closure (Language.js:280)
       at org.apache.royale.binding.PropertyWatcher.org_apache_royale_binding_PropertyWatcher_adjustListeners (PropertyWatcher.js:162)
       at org.apache.royale.binding.PropertyWatcher.parentChanged (PropertyWatcher.js:149)
       at org.apache.royale.binding.ItemRendererDataBinding.org.apache.royale.binding.DataBindingBase.setupWatchers (DataBindingBase.js:172)
       at org.apache.royale.binding.ItemRendererDataBinding.org.apache.royale.binding.DataBindingBase.setupWatchers (DataBindingBase.js:184)
       at org.apache.royale.binding.ItemRendererDataBinding.org_apache_royale_binding_ItemRendererDataBinding_makeGenericBinding (ItemRendererDataBinding.js:126)
       at org.apache.royale.binding.ItemRendererDataBinding.initBindingsHandler (ItemRendererDataBinding.js:107)
       at view.renderers.PartitionRequestTaskItemRenderer.org.apache.royale.events.EventDispatcher.fireListeners (EventDispatcher.js:117)
       at Function.goog.events.EventTarget.dispatchEventInternal_ (eventtarget.js:382)
   
   ```
   
   VO extends other VO which contains one property get/set. If there is anything which can help to resolve that would be grate. We have temporary removed [Bindable] completely from that VO.
   
   [data_for_issue.zip](https://github.com/apache/royale-asjs/files/4082776/data_for_issue.zip)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services