Select to view content in your preferred language

Widgets not completely deactivating on close

1596
5
Jump to solution
04-11-2012 11:10 AM
by Anonymous User
Not applicable
My widgets are not deactivating when they are closed.  An example is my identify widget.  I can identify a parcel in my parcel layer.  When I close the widget viewer it removes the selected parcel graphic layer and deselects the widget. It does not deactivate my cursor, so the when a parcel is clicked it still fires the identify widget even though it is closed.  It does not open the widget but it highlights the parcel.  How can I completely deactivate the widget when it is closed?  Below is my close handler. 

Thanks,

 private function wTemplate_closedHandler(event:Event):void {  clear();   hideInfoWindow();  removeCursor();  CursorManager.removeAllCursors();  this.currentState = "IdentifyInput";  wTemplate.selectedTitlebarButtonIndex=0;  setMapNavigation(null, null);  setMapAction(null, null, null, null); // deactivate drawTool  map.removeLayer(graphicsLayer);  map.removeLayer(parcelGraphicsLayer);  map.openHandCursorVisible = true;   } 
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Ray,

   There is no magic list of steps, but it sounds to me like you have not deactivated the drawTool in the MapManager from your drawEnd function. Or it could be that you have manually added event listeners to the map that you have not removed.

View solution in original post

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Ray,

    You got to start posting Flex Viewer Questions to the Flex Viewer forum..... Not here in the Flex API forum.

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex


The symptoms that you are describing are not reproducible in the standard Identify Widget (as can be tested on the live preview site http://gis.calhouncounty.org/FlexViewer2.5/index.html?config=config-identify.xml). So you must have changed something that broke the normal behavior.
0 Kudos
by Anonymous User
Not applicable
O Crap!! My bad Robert!!  You have told me that before.  I will begin to post to the Flex Viewer forum. 

I have made some changes to the identify widget.  Can you give me a step by step list of the process to take when you are closing a generic widget?  I cant seem to get the cursor to deactivate.

Thank Robert,
Ray
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ray,

   There is no magic list of steps, but it sounds to me like you have not deactivated the drawTool in the MapManager from your drawEnd function. Or it could be that you have manually added event listeners to the map that you have not removed.
0 Kudos
DaphneEdison
New Contributor
Thanks for these posts!
0 Kudos
by Anonymous User
Not applicable
Robert,
Thanks for you help! I actually deactivated the event in drawEnd and that worked!! 

Thanks, again
Ray
0 Kudos