Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

* | |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / General Discussion / TitleWindow size on: March 14, 2008, 09:36:25
Hi, can anybody say me, how make, that my TitleWindow should have height and width depends on childs in this window? This must be somthing, like "autoSize"?
Thanks in advanced!   ???
2  Announcements and General Discussion / General Discussion / Re: Can't remove Mediator object from memory! on: March 13, 2008, 10:30:36
Thank you, man. Problem was in PureMVC version. I'm now very happy! Respect for you )))  ;D
3  Announcements and General Discussion / General Discussion / Can't remove Mediator object from memory! on: March 13, 2008, 03:45:35
Good day!
I have problem with mediator objects removing.
My program is cuted into modules. In beginning, when i press button for window opening, some my Commans is running from Facade. In this Command will create Mediator and Proxy:
:
......
override public function execute(note:INotification):void
{
sysParamProxy = facade.retrieveProxy(SysParamProxy.NAME) as SysParamProxy;

if (sysParamProxy == null){
sysParamProxy = new SysParamProxy();
facade.registerProxy(sysParamProxy);
}
module = note.getBody() as SysParamModule;

sysParamMediator = facade.retrieveMediator(SysParamMediator.NAME) as SysParamMediator;

if (sysParamMediator == null){
sysParamMediator = new SysParamMediator(module.sysParamCreatePanel);
facade.registerMediator(sysParamMediator);
}

sysParamProxy.getSysParams();
}
.....
Then when i window is open, i press some button that dispatch some event SAVE_SYS_PARAM
Mediator retrieve this event and run some function, that run function in proxy.
:
private function onSave(event:Event):void
{
sysParamProxy.saveSysParams(event.target.sys_param as ArrayCollection);
}
When proxy continue with function, it send notification ApplicationFacade.SYS_PARAM_SAVED and Mediator than execte some code
:
public override function handleNotification(note:INotification):void
{
var data:Array;
switch (note.getName()){
case ApplicationFacade.SYS_PARAM_RECEIVED:
{
data = (note.getBody() as ArrayCollection).source;
sysParamPanel.sys_param = new ArrayCollection(data);
break;
}
case ApplicationFacade.SYS_PARAM_SAVED: // This code will be executed
{
trace("alert");
Alert.show("Settings saved");
}
default: break;
}
}
And now my question: When i first open window and press button i become one message "Alert", than i close window and open it one more and press button. This time i become two messages Alert, when i close window one more, i become 3 messages "Alert"...
It seems like my Mediators are not deleted from my Facade. I have traced and know, that with proxies is all right. How can i right delete my Mediators?
Pages: [1]