I have an AIR application for monitoring operations at a hospital (not really, but for the sake of this problem):
- It is possible to attach one or more comments to an operation
- The operations are displayed in a list
- When you double click on an operation all comments are retrieved from the server and displayed in a popup window
- It is also possible to add comments through that popup
During development (using compilation both with and without debug info) it is possible to see all previous comments in the popup window as well as adding new comments. Everything works as expected.
However, when I package the application using IntelliJ (using the menu entry "Package AIR application...") and run the installed application, I get the following error when the popup window opens and tries to display existing comments: (for an entry without comments, it works)
TypeError: Error #1034: Type Coercion failed: cannot convert Object@72cc5f9 to com.foocompany.hospital.monitoring.model.domain.OperationRoundNoteVO.
at com.foocompany.hospital.monitoring.presentation::CommentPresentationModel/addPreviousComments()
at com.foocompany.hospital.monitoring.presentation::CommentPresentationModel/userPopupAdded()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at org.swizframework.processors::ViewProcessor/processViewBean()
at org.swizframework.processors::ViewProcessor/setUpBean()
at org.swizframework.core::BeanFactory/setUpBean()
at org.swizframework.core::BeanFactory/handleBeanEvent()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at com.foocompany.hospital.monitoring.commands::LaunchPopupCommand/execute()
at org.swizframework.utils.commands::CommandMap/handleCommandEvent()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at org.swizframework.utils.chain::EventChainStep/doProceed()
at org.swizframework.utils.chain::BaseCompositeChain/doProceed()
at org.swizframework.utils.chain::EventChain/doProceed()
at org.swizframework.utils.chain::AbstractChain/proceed()
at org.swizframework.utils.chain::AbstractChain/stepComplete()
at org.swizframework.utils.chain::BaseChainStep/complete()
at org.swizframework.utils.chain::EventChainStep/complete()
at org.swizframework.utils.chain::EventChainStep/doProceed()
at org.swizframework.utils.chain::BaseCompositeChain/doProceed()
at org.swizframework.utils.chain::EventChain/doProceed()
at org.swizframework.utils.chain::AbstractChain/proceed()
at org.swizframework.utils.chain::AbstractChain/start()
at com.foocompany.hospital.monitoring.presentation::TableHistoryPresentationModel/addHistoryComment()
at com.foocompany.hospital.monitoring.view.mainwindow::TableHistory/__tablelist_doubleClick()
My questions:
- What do you think it could be? How would you troubleshoot it?
- Is there any way to attach a debugger to an installed AIR application?
- I do use `flashlog.txt` to see debug output and the above stack trace, but a debugger would be *much* more useful.
- Is there a way to attach the debugger using IntelliJ Idea 12?