Open GoogleCodeExporter opened 9 years ago
The problem is that after command execution facade calls on command instance
dispose method. This approach is essential if you want to have proper memory
management using Fabrication. Commands are created "on the fly" and every
reference it has inside ( injected references ) should be nulled before command
is destroyed. So, in your handler, wich is called after Command.dispose you
don't have access to proxy. Another question is the fact that you should not
use command this way - commands, by design, are stateless so using events in
command is not very good idea. If you need it to be done this way the solution
is to use old-fashioned retrieveProxy method.
Original comment by rafael.s...@gmail.com
on 5 Aug 2010 at 5:53
OK, thank you.
Where should I use event then? In Mediators?
As I've read Commands should be used for logic as often as possible, am I wrong?
Sometimes it's difficult to decide where to put some actions... command,
mediator or proxy... :) It's because lack of experience I guess :)
Is there any forum about Fab, so that I could move this topic there?
Original comment by Damian.R...@gmail.com
on 5 Aug 2010 at 6:16
Hi
Commands should manage all application logic, but this means that they are
responsible of telling all other actors what to do instead of doing it for
themselves. So, in your example, I'd move all encoding related action into
proxy - snapshot proxy should be responsible for managing data ( in this case
encoding and sending snapshot data ). HIDE_INDICATOR data can be there send
form proxy body.
P.S.
You can check and post here: http://forums.puremvc.org/index.php?board=63.0,
but if you find something that seems to be a bug - this you should do it as
you've done this time :)
Original comment by rafael.s...@gmail.com
on 5 Aug 2010 at 6:29
Ok. Thanks again :)
Original comment by Damian.R...@gmail.com
on 5 Aug 2010 at 6:35
YOu can read about this in here http://puremvc.org/content/view/80/188/, too.
Original comment by rafael.s...@gmail.com
on 5 Aug 2010 at 6:51
Original issue reported on code.google.com by
Damian.R...@gmail.com
on 5 Aug 2010 at 3:49