Select to view content in your preferred language

Error #2025: The supplied DisplayObject must be a child of the caller.

695
2
05-03-2011 08:07 AM
PeteVitt
Frequent Contributor
Hello
Im getting the subject error as I try to use an .mxml component containing a map dynamic map service in my main application.  If I substitue a button or label in place of the dynamic map service it works fine.  Any ideas?  thanks

Main application code:
<s:Application                      ...etc    
xmlns:CompRecordDrawings="*">
<s:Panel title="SARI Application" width="100%" height="100%">
  <s:TitleWindow id="twTOC" width="20%" height="100%">
   <s:Button id="Button1" label="click" click="OnClick()">
   </s:Button>
  </s:TitleWindow>
  <s:TitleWindow id="twContent" visible="false" close="twContentClose()">
   <CompRecordDrawings:CompRecordDrawings  width="100%" height=100%"/>
  </s:TitleWindow>
</s:Panel>

Component Code:

<!--<s:Button  label="this button"/>-->
 
  <esri:Map id="theMap"
      logoVisible="false">
   <esri:ArcGISDynamicMapServiceLayer id="dynamicLayerBackground"
              url="http://www.myServer/ArcGIS/rest/services/SARI_AddlFeatures_Flex/MapServer"/>
  
  </esri:Map>
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Pete,

   You don't have an esri namespace in your main application element.

xmlns:esri="http://www.esri.com/2008/ags"
0 Kudos
PeteVitt
Frequent Contributor
Thanks for the response:

Based on something I found searching the error in google I changed the tag in the component from <application> to <group> and it worked -- no idea why

Pete
0 Kudos