topleft topright

Welcome, Guest. Please login or register.
May 24, 2013, 04:18:47 PM
Home Help Search Login Register
News: ATTENTION: Spambots must die! Humans must visit http://contact.futurescale.com to request forum access.

Pages: [1]
Print
Author Topic: PureMVC bug?  (Read 608 times)
sirGordon
Newbie
*
Posts: 4


View Profile Email
« on: December 27, 2011, 06:04:24 AM »

Hello community, i have a strange situation that for me looks like a bug. Here are steps to reproduce:

User interacts with a window behind which i have the following microarchitecture:
myFacade that extends basic Facade
myProxy that extends Proxy behind myFacade.
myproxy has method getData that requests data from server asynchronously (AMF) using AsyncToken and Responder and then passes data to view via sendNotification method.

Now what do i do:
1. I create window, instantiate myFacade and myProxy, and call getData method.
2. Before server responds, user closes the window, so Facade.removeCore is called, and myFacade is removed.
3. Now server responds, and onResult method in myProxy calls sendNotification, which instantiates Facade with my multiton key (it is cached in Notifier) and i get a new Facade instance in the instanceMap of wrong type. LOL

Any ideas? Thanks in advance.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2790



View Profile WWW
« Reply #1 on: December 27, 2011, 08:29:37 AM »

Before removing the core you should do any cleanup inside the core that you know may cause problems. When the user closes the window, before removing the core, you should retrieve the Proxy and make a call to cancel the service call.

-=Cliff>
Logged
sirGordon
Newbie
*
Posts: 4


View Profile Email
« Reply #2 on: December 29, 2011, 02:31:42 AM »

thanks Cliff Cheesy LOL
Logged
Pages: [1]
Print
Jump to:  



Login with username, password and session length

Powered by SMF 1.1.11 | SMF © 2006-2007, Simple Machines LLC
Copyright © 2006-2008 Futurescale, Inc.