flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: git commit: [flex-asjs] [refs/heads/develop] - This appears to be inoperative. I believe this change is correct, but it really needs a test.
Date Mon, 24 Jul 2017 10:32:15 GMT
While researching the issue I had, I noticed this code.

It appears to be removing the event handlers from the object and then adding them back to
the same objects. I believe the change I wrote is necessary to add the event handlers to the
new object, but I’d appreciate if we get some additional eyeballs on this.

I did not see any tests for this, and I don’t have the time right now to write one.

Thanks,
Harbs
 
> On Jul 24, 2017, at 1:29 PM, harbs@apache.org wrote:
> 
> Repository: flex-asjs
> Updated Branches:
>  refs/heads/develop 2458fe559 -> 61ef18b9a
> 
> 
> This appears to be inoperative. I believe this change is correct, but it really needs
a test.
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/61ef18b9
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/61ef18b9
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/61ef18b9
> 
> Branch: refs/heads/develop
> Commit: 61ef18b9adce1b6fbc650cd07654198e90d780d5
> Parents: 2458fe5
> Author: Harbs <harbs@in-tools.com>
> Authored: Mon Jul 24 13:29:05 2017 +0300
> Committer: Harbs <harbs@in-tools.com>
> Committed: Mon Jul 24 13:29:05 2017 +0300
> 
> ----------------------------------------------------------------------
> .../flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as | 3 +++
> 1 file changed, 3 insertions(+)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/61ef18b9/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as
> index e8c28bd..bab1c4a 100644
> --- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as
> +++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataProviderChangeNotifier.as
> @@ -56,10 +56,13 @@ package org.apache.flex.html.beads
> 			}
> 			else
> 			{
> +				if(object[propertyName] == dataProvider)
> +					return;
>                 dataProvider.removeEventListener("itemAdded", handleDataProviderChanges);
>                 dataProvider.removeEventListener("itemRemoved", handleDataProviderChanges);
>                 dataProvider.removeEventListener("itemUpdated", handleDataProviderChanges);
>                 dataProvider.removeEventListener("collectionChanged", handleDataProviderChanges);
> +				dataProvider = object[propertyName] as ArrayList;
> 			}
> 
>             dataProvider.addEventListener("itemAdded", handleDataProviderChanges);
> 


Mime
View raw message