1

Flex 4.5 から Flex 4.6 にアップグレードしたところ、アプリケーションは Flex 4.5 で完全に動作していましたが、Flex 4.6 で実行するとエラーが発生し続けます。

このビットがエラーをスローします。 loginPopup は SkinnablePopupContainer です

protected function init(event:FlexEvent):void
{
    loginPopup = new LoginPopup();      
    loginPopup.currentState = "Start";
    loginPopup.open(UIComponent(FlexGlobals.topLevelApplication),true); -- This line throws the error
}

エラーは次のとおりです。

[SWF] TDMAPP.swf - 7,212,792 bytes after decompression

ArgumentError: エラー #2025: 指定された DisplayObject は呼び出し元の子でなければなりません。flash.display::DisplayObjectContainer/getChildIndex() で mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_getChildIndex()[E:\dev\4.y \frameworks\projects\framework\src\mx\managers\SystemManager.as:2187] at mx.managers::SystemRawChildrenList/getChildIndex()[E:\dev\4.y\frameworks\projects\framework\src\mx\ manager\SystemRawChildrenList.as:181] at spark.components.supportClasses::StyleableStageText/getFormIndex()[E:\dev\4.y\frameworks\projects\mobilecomponents\src\spark\components\supportClasses\StyleableStageText.as:1956 ] at spark.components.supportClasses::StyleableStageText/findTopmostForm()[E:\dev\4.y\frameworks\projects\mobilecomponents\src\spark\components\supportClasses\StyleableStageText.as:

これを解決する方法を知っている人はいますか?

4

1 に答える 1

1

ビューの CREATION_COMPLETE イベントではなく、このコードを APPLICATION_COMPLETE イベントに入れることで、これを解決しました。Flex 4.6 では作成順序が少し異なるようです

それが役立つことを願っています。

于 2013-09-25T03:07:08.950 に答える