rafalszemraj / fabrication

Automatically exported from code.google.com/p/fabrication
2 stars 1 forks source link

Mediators are being instanciated two time #22

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Why the mediators are being instanciated two times? One time by the execute 
function of the StarupCommand and a second time by reflection.

I dont think this is good.

Original issue reported on code.google.com by rene.lav...@sarbakan.com on 23 Sep 2010 at 2:35

GoogleCodeExporter commented 9 years ago
Hi rene,

Yes, you're right. This second time is due to workaround for adobe bug and it 
is not in fabrication itself but in as3-reflection framework fabrication 
depends on. I've never thought that is huge problem because in fact in 
mediators there is no much things going on so creating locally another instance 
of mediator should not be major problem.

Original comment by rafael.s...@gmail.com on 23 Sep 2010 at 4:57

GoogleCodeExporter commented 9 years ago
My understanding is mediators create the view. In my case the view is a game so 
to create the game view two times could be problematic, don't you think? Alot 
of expensive instanciation are being done in a game view.

Original comment by rene.lav...@sarbakan.com on 23 Sep 2010 at 5:31

GoogleCodeExporter commented 9 years ago
Yes, but creating view should be done in onRegister method of mediator. This 
method is called only on mediator registration wich is not being done during 
second mediator creation within as3-reflect framework.

Original comment by rafael.s...@gmail.com on 24 Sep 2010 at 11:55

GoogleCodeExporter commented 9 years ago
Hey thanks alot!! I'm new as you can see to pure mvc and fabrication. But I 
like it very much so far. Congratulation on the good work and the good support. 
I work in the game industry and I want to implement this framework in our 
production pipeline. 

Original comment by rene.lav...@sarbakan.com on 24 Sep 2010 at 12:06

GoogleCodeExporter commented 9 years ago
I'm very happy you like it, really :). Wish you good luck with introducing 
fabrication into your work ! 

Original comment by rafael.s...@gmail.com on 24 Sep 2010 at 1:06