You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Harbs <ha...@gmail.com> on 2019/07/03 17:55:50 UTC
Re: [royale-asjs] 01/04: Fix for top-level reset variation in
SimpleBinding
Not sure I’m understanding the reason for this, but would undefined be better than null?
> On Jul 3, 2019, at 11:55 AM, gregdove@apache.org 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 <gr...@gmail.com>
> 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;
> }
> }
> }
>
Re: [royale-asjs] 01/04: Fix for top-level reset variation in SimpleBinding
Posted by Greg Dove <gr...@gmail.com>.
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 <ha...@gmail.com> 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, gregdove@apache.org 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 <gr...@gmail.com>
> > 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;
> > }
> > }
> > }
> >
>
>