flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FlexJS, MDL] Why binding is not working in MDL example
Date Mon, 02 Jan 2017 15:25:49 GMT

On 1/2/17, 12:54 AM, "piotrz" <piotrzarzycki21@gmail.com> wrote:

>I have such property:
>public function get menuItem():MenuItemVO
>   return data as MenuItemVO;
>My item renderer inherits from MXMLItemRenderer. I see that property
>in my item renderer is being assigned and "data" from MXMLItemRenderer
>dispatch event "dataChange", so my getter for menuItem should be fired
>yes ? 

A databinding expression of {data.someProperty} or {menuItem.someProperty}
is going to be checked for not only changes to what object data is
referencing, but also for when someProperty changes while the renderer is
just sitting there on the screen.

In most cases, checking for changes to someProperty is not needed in a
renderer.  We don't have a great way of telling the compiler not to check
for changes to someProperty.  I think FlexJSStore uses
[Bindable("__NoChangeEvent__")] to shut off all checks since renderers are
currently not recycled in our list classes.  The binding will be evaluated
at renderer instantiation time and it will all "just work".

I suppose we could add some metadata for that scenario.


View raw message