Bug when unload module containing wizard
Hi
I'm using Cairngorm Navigation Library in a modular application. One of them contains a Cairngorm 3 wizard. Like the sample in svn, the context is initialized with the wizard and a PM class (as MessagesPM) :
[Landmark(name="myWizard")]
public class MessagesPM
{
private static const LOG:ILogger=LogUtil.getLogger(MessagesPM);[Bindable]
public var message:String="";//------------------------------------------------------------------------
//
// Enter/Exit Methods
//
//------------------------------------------------------------------------[Enter(time="first")]
public function firstEnter():void
{
message+="First enter\n";
LOG.info("content.messages:FirstEnter");
}...
When I unload this module with ModuleLoader I have this error :
ArgumentError: Error #1063: Argument count mismatch on com.adobe.cairngorm.navigation.landmark::AbstractNavigationDecorator/preDestroy(). Expected 2, got 0.
at Function/http://adobe.com/AS3/2006/builtin::apply()
at org.spicefactory.lib.util::Delegate/invoke()
at org.spicefactory.lib.util::DelegateChain/invokeChain()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at org.spicefactory.lib.util::Delegate/invoke()
at SynchronizedProvider/invokeDestroyHandlers()
at org.spicefactory.parsley.core.registry.definition.impl::DefaultLifecycleListenerRegistry/invokeDestroyHandlers()
at org.spicefactory.parsley.core.registry.definition.impl::SingletonLifecycleListenerRegistry/destroyProvider()
at org.spicefactory.parsley.core.registry.definition.impl::SingletonLifecycleListenerRegistry/postDestroy()
at org.spicefactory.parsley.core.lifecycle.impl::DefaultObjectLifecycleManager/processLifecycle()
at org.spicefactory.parsley.core.lifecycle.impl::DefaultObjectLifecycleManager/doDestroy()
at org.spicefactory.parsley.core.lifecycle.impl::DefaultObjectLifecycleManager/destroyAll()
at org.spicefactory.parsley.core.context.impl::DefaultContext/contextDestroyed()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.spicefactory.parsley.core.context.impl::DefaultContext/destroy()
at wizardModules::Module1/destroyContext()
at wizardModules/removeModule1()
at wizardModules/___wizardModules_Button2_click()
But after this alert, the module is unloaded and I can reload it without problem...
If I remove the PM from the context, my wizard works perfectly in the module and I don't have anymore this error when unloading module.
If I initialize the PM in the parent application context, it works too.
The problem is that I want to declare this PM only in the module, not in the application, but it makes errors on unloading...
Do I have to use the Cairngorm Module Library? I checked on Parsley documentation and they say that we can use flex modules and ModuleLoader. I tried to destroy manually the context but it doesn't change anything.
