It is when a top level item is reset
label text={myOtherthing.someValue}
if myOtherthing gets set to null elsewhere, the binding was not updating
before this, so the text was not set to empty. Setting to null works, not
sure about undefined... I can't see strict equality being used anywhere in
Bindings (expect in one typeof check where it should not make any
difference)
On Thu, Jul 4, 2019 at 5:56 AM Harbs <[email protected]> wrote:
> Not sure I’m understanding the reason for this, but would undefined be
> better than null?
>
> > On Jul 3, 2019, at 11:55 AM, [email protected] wrote:
> >
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > gregdove pushed a commit to branch develop
> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> >
> > commit cf410568241cbba9d6f55cb3aa73983d213a7cae
> > Author: greg-dove <[email protected]>
> > AuthorDate: Wed Jul 3 19:56:15 2019 +1200
> >
> > Fix for top-level reset variation in SimpleBinding
> > ---
> > .../Binding/src/main/royale/org/apache/royale/binding/SimpleBinding.as
> | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git
> a/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/SimpleBinding.as
> b/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/SimpleBinding.as
> > index 9ecfd96..8d6934d 100644
> > ---
> a/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/SimpleBinding.as
> > +++
> b/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/SimpleBinding.as
> > @@ -273,6 +273,8 @@ public class SimpleBinding implements IBead,
> IDocument, IBinding
> > {
> > dispatcher.addEventListener(eventName,
> changeHandler);
> > destination[destinationPropertyName] =
> source[sourcePropertyName];
> > + } else {
> > + destination[destinationPropertyName] = null;
> > }
> > }
> > }
> >
>
>