strategyMarketsOfCurrentStrategy.addEventListener(CollectionEvent.COLLECTION_CHANGE, strategyMarketsDataChangedHandler);
strategyMarketsOfCurrentStrategy.removeAll();
strategyMarketsOfCurrentStrategy.addAll(strategyProfilesForClone);
private function strategyMarketsDataChangedHandler(event:CollectionEvent):void
{
trace("ffffffffffffffffffffffffffffffffffffffff"+ObjectUtil.toString(event.kind));
isStrategyMarketsChanged = true;
if (event.kind == CollectionEventKind.ADD)
{
event.items[0].dirty = true;
event.items[0].isInvalidTradeCountry = true;
event.items[0].isHoldBackFlagExist = true;
event.items[0].isStatusExist = true;
}
}
结果是strategyMarketsDataChangedHandler 没有被执行。
若只保留strategyMarketsOfCurrentStrategy.removeAll(); 则就会被执行到。 。。。。。。。。。。奇怪