Print Widget Action Script Error

484
1
12-07-2010 04:09 AM
AlisonSengupta
New Contributor III
We are using the Flex Sample Viewer 1.3 with some customizations.  I haven't touched the print widget, but we are getting the following error when trying to print:
An ActionScript error has occurred:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$removeChild()
at mx.core::Container/removeChild()
at com.esri.solutions.flexviewer.widgets::PrintWidget/printMap()
at com.esri.solutions.flexviewer.widgets::PrintWidget/___PrintWidget_Button1_click()

The widget comes up and you can click on the print button and get a choice of printers.  Once you choose a printer and then go to print the error above pops up.  I have tried replacing the widget I have with a fresh one from someone whose print widget works.  We still get this error.  What else does the print widget tie into that I may need to check?  Any help would be greatly appreciated. 

I did get a map to print by fluke this morning (once) and then the error started popping up.  Sometimes users can get the map to start spooling in the print queue but it never prints.  Most of the time we get the error above.

Thanks,
Alison
Tags (2)
0 Kudos
1 Reply
AlisonSengupta
New Contributor III
With a little help from some other folks programming with flex, I figured out the issue with printing from my flex viewer.  It turns out if I commented out the following code (this.removeChild(printBox)) in the catch error section of the printwidget.mxml so that it just shows an alert, I got the real error message.  There is something wrong with the wms service we are brining in to the viewer to display precipitation data.  It is not working properly.  If I remove that service from the config file, the print widget works just fine.  Go figure.

Thanks,
Alison
0 Kudos