Select to view content in your preferred language

funky chicken bug

2302
1
09-05-2011 09:15 PM
PaulHastings1
Deactivated User
i have a strange strange bug that i can't get my head around:

i have a locator service that a user can add points to a map from the results:

protected function locateCandidate(event:Event): void {
    moveIt.target=locatorWindow;
    moveIt.end();
    moveIt.play();
    var item:Object=locatorWindow.candidates.selectedItem;
    var thisGraphic:Graphic = new Graphic();
    thisGraphic.id="locatorGraphic";
    thisGraphic.toolTip=item.address+" ("+item.type+")";
    thisGraphic.geometry=new MapPoint(item.x,item.y,theMap.spatialReference);
    projectSightGraphics.add(thisGraphic);
    theMap.centerAt(thisGraphic.geometry as MapPoint);   
   }

works fine. the funkiness comes if the user next chooses a terrain profile tool:
- which clears the graphics layer,
- activates a drawing polyline tool which the user ends by double clicking
- that polyline is passed to the correct event handler which hands off the parameters to a geoprocessing task and then this occurs:


TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at spark.components::Grid/get
selectedItems()
at flash.utils::ByteArray/writeObject()
at
mx.utils::ObjectUtil$/copy()
at
Function/com.esri.ags.tasks:Geoprocessor/private:toURLVariables/com.esri.ags.tasks:getNormalizedGeometryFunction()
at
mx.rpc::AsyncResponder/result()
at
com.esri.ags.utils::GeometryUtil$/http://www.esri.com/2008/ags/internal::normalizeCentralMeridian2()
at
com.esri.ags.utils::GeometryUtil$/normalizeCentralMeridian()
at
com.esri.ags.tasks::Geoprocessor/toURLVariables()
at
com.esri.ags.tasks::Geoprocessor/execute()
at shale/drawEndHandler()
at shale/__drawTool_drawEnd()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
com.esri.ags.tools::DrawTool/removeLayerEndDraw()
at
com.esri.ags.tools::DrawTool/map_doubleClickHandler()


no other combo of user/map interaction cause this, just adding locate results to the map, followed by this terrain profile tool.

no idea even where to begin, what search terms to use, etc. so any ideas much appreciated.

thanks.
Tags (2)
0 Kudos
1 Reply
RaoPallekala
New Contributor
Hi there,

Is your problem resolved? I am also getting similar error after upgrading from ArcGIS Viewer 2.2 to ArcGIS Viewer 2.3. Please let me know the solution if your problem is fixed.

Thank you in Advance
0 Kudos