When I recently deployed an application to the server, I got this lovely error message that is easily worth a few hours:
ArgumentError: Error #2004: One of the parameters is invalid.
at flash.display::Graphics/drawRoundRect()
at mx.skins::ProgrammaticSkin/drawRoundRect()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\skins\ProgrammaticSkin.as:745]
at mx.skins.halo::ButtonSkin/updateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\skins\halo\ButtonSkin.as:217]
at mx.skins::ProgrammaticSkin/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\skins\ProgrammaticSkin.as:421]
at mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:602]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:675]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
It came from a loaded Module and only appeared on the server. While debugging, all went smoothly. So first I found out that it appeared only in the remote sandbox (though I still don’t know why, any suggestions?). Then, the Module was somewhat suspicious, so I dived into ApplicationDomains, SecurityDomains and the like. Besides the docs and forums, Alex Harui has a few nice images in a presentation and Roger Gonzalez posts where also helpful. After all, this was not the point.
Getting closer
The second difference between the debug- and the deployed application was that I linked in FlexSpy. This meant that for example ColorPicker or ComboBox were already sitting in ApplicationDomain.currentDomain.
Ok, lets have a look a the different link-reports and hey, there was a difference: “mx/skins/halo/ColorPickerSkin” and “_ColorPickerStyle.as” were missing in the Module! The second hit of Googling “flex module halo” brings you to the Flex release notes. There, I “happily” discovered bug SDK-9485 that states… well, read it yourself but afterwards put the following in your CSS:
ColorPicker
{
upSkin: ClassReference(“mx.skins.halo.ColorPickerSkin”);
overSkin: ClassReference(“mx.skins.halo.ColorPickerSkin”);
downSkin: ClassReference(“mx.skins.halo.ColorPickerSkin”);
disabledSkin: ClassReference(“mx.skins.halo.ColorPickerSkin”);
}ComboBox
{
upSkin: ClassReference(“mx.skins.halo.ComboBoxArrowSkin”);
overSkin: ClassReference(“mx.skins.halo.ComboBoxArrowSkin”);
downSkin: ClassReference(“mx.skins.halo.ComboBoxArrowSkin”);
disabledSkin: ClassReference(“mx.skins.halo.ComboBoxArrowSkin”);
}
The End
The moral of the story is that first, I hope that you save time with this post. And second, that I really don’t like computers!
9 October 2009 at 13:30 |
I’ve got the same error message, but you solution ain’t helped me
Google helped to solve the problem.
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg113733.html
here is offered to add a combo box in the main application. so I did:
9 October 2009 at 13:31 |
ah… xml-like text is not allowed here
import mx.managers.PopUpManager;
private var mPopUpManager : PopUpManager;
private var mComboBox : ComboBox = new ComboBox();
9 October 2009 at 16:57 |
Thanks for the feedback, Sergey. You are seeing a different problem of modules that I’ve also run across.
Sorry for the XML but WordPress.com does not allow XML in comments as far as I know
Marc