I have been running through the flex in a week tutorial and been playing around with developing a flex mobile app using snippets from flex api samples. I found the Secure editing sample, and have been trying to run that in a flex mobile project. However, I am running into an error when I run IdentityManager function in the code: <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:esri="http://www.esri.com/2008/ags" initialize="application1_initializeHandler(event)"> <fx:Script> <![CDATA[ import com.esri.ags.components.IdentityManager; import com.esri.ags.events.LayerEvent; import com.esri.ags.geometry.MapPoint; import com.esri.ags.layers.TiledMapServiceLayer; import mx.events.FlexEvent; protected function application1_initializeHandler(event:FlexEvent):void { IdentityManager.instance.enabled = true; } private function layerShowHandler(event:FlexEvent):void { // update the LODs/zoomslider to use/show the levels for the selected base map var tiledLayer:TiledMapServiceLayer = event.target as TiledMapServiceLayer; myMap.lods = tiledLayer.tileInfo.lods; } protected function marine_loadHandler(event:LayerEvent):void { myEditor.featureLayers = [ marine ]; myEditor.attributeInspector.fieldInspectors = [ creatorFI, typeFI ]; } ]]> </fx:Script>
I get the runtime error of ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/getChildIndex() at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_getChildIndex() at mx.managers::SystemRawChildrenList/getChildIndex() at spark.components.supportClasses::StyleableStageText/getFormIndex() at spark.components.supportClasses::StyleableStageText/findTopmostForm() at spark.components.supportClasses::StyleableStageText/updateProxyImageForTopmostForm() at spark.components.supportClasses::StyleableStageText/commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/validateClient() at mx.managers::PopUpManagerImpl/addPopUp() at mx.managers::PopUpManagerImpl/createPopUp() at mx.managers::PopUpManager$/createPopUp() at com.esri.ags.components::IdentityManager/popUpSignInWindow() at com.esri.ags.components::IdentityManager/signIn() at com.esri.ags.components::IdentityManager/doSignIn() at com.esri.ags.components::IdentityManager/enqueue() at Function/com.esri.ags.components:IdentityManager/getCredential/com.esri.ags.components:svcInfoResult2() at mx.rpc::Responder/result() at Function/<anonymous>() at MyURLLoader/completeHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete()
Is this an error due to the creation of a popup window on a cell device or is this just an error due to bad code writing? the code works great in a windowed project, but causes this error on a mobile project. Thanks in advance for helping me understand what is going on!ClintonAfter doing some more research on IdentityManager, I think the issue has something due to do with configuring PopUpManager. But I am not yet there technically to understand it. Thanks!