SimpleBinding is tuned for simple cases.  It doesn't expect the object it
is watching to change, just its properties.

GenericBinding will watch for that, but the DataBinding implementation has
to choose GenericBinding.

It should be ok for objects to share models as long as it is done "early"
in the lifecycle.  If it used to work, it was probably because the model
was shared before binding was evaluated.  I would recommend finding a way
to delay the evaluation of the binding until after the model is shared.

I can look into it this evening.

-Alex

On 6/5/17, 2:28 PM, "piotrz" <piotrzarzyck...@gmail.com> wrote:

>Hi Yishay,
>
>I did spent some time on this but cannot find so far why binding is not
>working after model change. I think it should be.
>
>There is SimpleBinding class involve in all of this. Array _bindings [1]
>seems to contains everything what needed, but maybe we should react
>somewhere on "modelChanged" event.
>
>But where ? Changing model on the fly should reflected into refreshing in
>somehow binding.
>
>The only thing which I noticed that when I'm assigning new model [2], it's
>being added as bead but the old one is not removed. Basically when you do
>this one:
>
>pv.titleBar.model = new TitleBarModel(); - You will have many models in
>_beads Array.
>
>Not sure if it is ok.
>
>[1] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apa
>che.org%2FSsO4&data=02%7C01%7C%7Cf670dbe4aa2141a0704b08d4ac5bf2c3%7Cfa7b1b
>5a7b34438794aed2c178decee1%7C0%7C0%7C636322958296810241&sdata=ybbRW2qgPwSF
>TLec0pUskBiLkcurDjnISYQWm0JvLqs%3D&reserved=0
>[2] 
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apa
>che.org%2FEfit&data=02%7C01%7C%7Cf670dbe4aa2141a0704b08d4ac5bf2c3%7Cfa7b1b
>5a7b34438794aed2c178decee1%7C0%7C0%7C636322958296810241&sdata=cG2ZqQnin9%2
>Blgd7i5vVKTHwqsyQdUR47tRYA5vGeSuM%3D&reserved=0
>
>Piotr
>
>
>
>-----
>Apache Flex PMC
>piotrzarzyck...@gmail.com
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-DataBinding-Problem-tp62073p6
>2123.html&data=02%7C01%7C%7Cf670dbe4aa2141a0704b08d4ac5bf2c3%7Cfa7b1b5a7b3
>4438794aed2c178decee1%7C0%7C0%7C636322958296810241&sdata=ZSPovQAOFZ22PBxLk
>nt8qAvw4hfqhS6YGqT2oSM3gb0%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to