关于ALERT 的问题

        public function saveUpdateStrategySucceededHandler(returnedResults:ArrayCollection ):void
        {
            trace("oooooopppppppooo");
            isSavingStrategy = false;
            isStrategyChanged = false;
            isStrategySelected = false;
            isNewStrategySaved = true;
            strategiesOfCurrentClient = returnedResults;
            strategiesOfCurrentClientCache = ObjectUtil.copy(strategiesOfCurrentClient) as ArrayCollection;
            strategiesOfCurrentClient.addEventListener(CollectionEvent.COLLECTION_CHANGE,strategyChangedHandler);
        //strategy real time on tab manageUserMcmp   
            currentImId = currentClientInTabManageUser.selectedItem.clientId;
            trace("dfsdfireoyiy"+ObjectUtil.toString(currentImId));
            loadStrategiesByCurrentIM();

            tabUser.setStrategiesOfIMChecked();

            if(doesRemove)
            {
                strategyMarketsOfCurrentStrategy = null;
            }
            Alert.show(AlertMessageConstants.SAVE_SUCCEEDED, AlertMessageConstants.NOTICE);

        }

 

其中currentClientInTabManageUser与界面的DataGrid绑定

log:

Method "saveUpdateStrategy" cost 0.078 seconds.
oooooopppppppooo

 

也就是说在save 完成后没有跑到   trace("dfsdfireoyiy"+ObjectUtil.toString(currentImId));

这可能是由于 currentClientInTabManageUser. selectedItem 没有值绑定,执行到这句出错,但没有提示ALERT.SHOW也没出来。

 

后改成       

public function saveUpdateStrategySucceededHandler(returnedResults:ArrayCollection ):void
        {
            isSavingStrategy = false;
            isStrategyChanged = false;
            isStrategySelected = false;
            isNewStrategySaved = true;       
            strategiesOfCurrentClient = returnedResults;
            strategiesOfCurrentClientCache = ObjectUtil.copy(strategiesOfCurrentClient) as ArrayCollection;
            strategiesOfCurrentClient.addEventListener(CollectionEvent.COLLECTION_CHANGE,strategyChangedHandler);
        //strategy real time on tab manageUserMcmp   
            if(currentClientInTabManageUser.selectedItem)
            {
                this.currentImId = currentClientInTabManageUser.selectedItem.clientId;       
                loadStrategiesByCurrentIM();
                tabUser.setStrategiesOfIMChecked();
            }

            if(doesRemove)
            {
                strategyMarketsOfCurrentStrategy = null;
            }
            Alert.show(AlertMessageConstants.SAVE_SUCCEEDED, AlertMessageConstants.NOTICE);
        }

问题解决。

阅读更多
文章标签: datagrid function null
个人分类: FLEX
想对作者说点什么? 我来说一句

IOS7下可AddSubView的AlertView

2013年12月14日 5KB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭