Summary:
Opening a window containing a module, closing the window, and then reopening the window results in an exception. I do not know that this is a bug in Parsley. It could be a developer bug. Feel free to evaluate whether this project is a good example project to show off parsley: I couldn't find many examples of this sort and would like to share this.
Files:
Project file is at this location:
git clone
git://github.com/jpravetz/f4b-examples.git
Steps:
The example test-shell is my bare bones example of using Parsley 2.1 with Flash Builder 4 (FB4). There are three modules loaded. I am having trouble with the third module, which is loaded into a window.
1. Build and launch test-shell
2. (optional) Type some messages. These send out an event that everyone monitors.
3. Click 'Open Module3 Window'
4. Close window
5. Click 'Open Module3 Window'
Result:
An exception, with the following stack trace:
Error: One or more errors processing CompositeContextBuilder:
Error processing [object ActionScriptObjectDefinitionBuilder]: One or more errors in ActionScriptObjectDefinitionBuilder:
One or more errors processing test.module3::Module3Context:
Error building object definition for [Property _Module3Context_Module3PanelPM1 in class test.module3::Module3Context]: Error #1009: Cannot access a property or method of a null object reference.
at org.spicefactory.parsley.core.builder.impl::DefaultCompositeContextBuilder/handleErrors()[I:\Spicefactory\Parsley\parsley-core\org\spicefactory\parsley\core\builder\impl\DefaultCompositeContextBuilder.as:210]
at org.spicefactory.parsley.core.builder.impl::DefaultCompositeContextBuilder/invokeNextBuilder()[I:\Spicefactory\Parsley\parsley-core\org\spicefactory\parsley\core\builder\impl\DefaultCompositeContextBuilder.as:170]
at org.spicefactory.parsley.core.builder.impl::DefaultCompositeContextBuilder/invokeNextBuilder()[I:\Spicefactory\Parsley\parsley-core\org\spicefactory\parsley\core\builder\impl\DefaultCompositeContextBuilder.as:199]
at org.spicefactory.parsley.core.builder.impl::DefaultCompositeContextBuilder/build()[I:\Spicefactory\Parsley\parsley-core\org\spicefactory\parsley\core\builder\impl\DefaultCompositeContextBuilder.as:159]
at org.spicefactory.parsley.flex::FlexContextBuilder$/buildAll()[I:\Spicefactory\Parsley\parsley-flex\org\spicefactory\parsley\flex\FlexContextBuilder.as:77]
at org.spicefactory.parsley.flex::FlexContextBuilder$/build()[I:\Spicefactory\Parsley\parsley-flex\org\spicefactory\parsley\flex\FlexContextBuilder.as:59]
at test.module3::Module3Module/___Module3Module_Module1_preinitialize()[/Users/jpravetz/dev/epdoc/f4b-examples/test-shell/src/test/module3/Module3Module.mxml:10]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as:11749]
at mx.core::UIComponent/initialize()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as:6871]
at mx.core::Container/initialize()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\Container.as:3090]
at test.module3::Module3Module/initialize()
at mx.core::UIComponent/
http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as:6766]
at mx.core::Container/
http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\Container.as:3915]
at mx.core::Container/addChildAt()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\Container.as:2578]
at mx.core::Container/addChild()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\Container.as:2496]
at mx.modules::ModuleLoader/moduleReadyHandler()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\modules\ModuleLoader.as:430]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfoProxy/load()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1111]
at Flex4ModuleInfoBase/load()[I:\Spicefactory\Parsley\parsley-flex\org\spicefactory\parsley\flex\modules\FlexModuleSupport.as:119]
at mx.modules::ModuleLoader/loadModule()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\modules\ModuleLoader.as:357]
at test.shell::Module3Window/init()[/Users/jpravetz/dev/epdoc/f4b-examples/test-shell/src/test/shell/Module3Window.mxml:16]
at test.shell::Module3Window/___Module3Window_Window1_creationComplete()[/Users/jpravetz/dev/epdoc/f4b-examples/test-shell/src/test/shell/Module3Window.mxml:6]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as:11749]
at mx.core::UIComponent/set initialized()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as:1525]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\managers\LayoutManager.as:759]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1069]
http://github.com/jpravetz/f4b-examples