You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2017/07/24 10:29:09 UTC
git commit: [flex-asjs] [refs/heads/develop] - This appears to be
inoperative. I believe this change is correct, but it really needs a test.
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 <ha...@in-tools.com>
Authored: Mon Jul 24 13:29:05 2017 +0300
Committer: Harbs <ha...@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);
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.
Posted by Harbs <ha...@gmail.com>.
Good call.
I noticed that I can simplify the code a bit as well.
I added this to the other notifier classes too.
> On Jul 24, 2017, at 1:37 PM, Piotr Zarzycki <pi...@gmail.com> wrote:
>
> Hi Harbs,
>
> I think this line should be outside "if":
>
> var object:Object = document[sourceID];
>
> Please check additionally other beads related to ChangeNotifier.
>
> Thanks,
> Piotr
>
>
> 2017-07-24 12:29 GMT+02:00 <ha...@apache.org>:
>
>> 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 <ha...@in-tools.com>
>> Authored: Mon Jul 24 13:29:05 2017 +0300
>> Committer: Harbs <ha...@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);
>>
>>
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.
Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Harbs,
I think this line should be outside "if":
var object:Object = document[sourceID];
Please check additionally other beads related to ChangeNotifier.
Thanks,
Piotr
2017-07-24 12:29 GMT+02:00 <ha...@apache.org>:
> 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 <ha...@in-tools.com>
> Authored: Mon Jul 24 13:29:05 2017 +0300
> Committer: Harbs <ha...@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);
>
>
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.
Posted by Harbs <ha...@gmail.com>.
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 <ha...@in-tools.com>
> Authored: Mon Jul 24 13:29:05 2017 +0300
> Committer: Harbs <ha...@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);
>