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 <piotrzarzyck...@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);
>> 
>> 

Reply via email to