incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Heidegger ...@leichtgewicht.at>
Subject Re: [RT] From Singletons to Unit-testable code
Date Wed, 08 Feb 2012 15:57:57 GMT
On 09/02/2012 00:44, Alex Harui wrote:
> I think the simplest is just adding a replaceInstance on mx.core.Singleton...
The replacement in Singleton is just reasonable if all static code was 
actually handled within the singleton code. I tried to explain before: 
there is more code in the statics than just the reference to the 
Singleton and this code can not be ignored. The service locator could 
work without restricting itself to the singleton.


On 09/02/2012 00:44, Alex Harui wrote:
> ....that dispatches an event with what got replaced.
If we have to change the logic of the system so that all static classes 
register to the changes of the event it will certainly result in a lot 
of code.

yours
Martin.



Mime
View raw message