uludaggonul / snow-dots

Automatically exported from code.google.com/p/snow-dots
0 stars 0 forks source link

How to manage singleton init dependencies? #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
There are some important dependencies among the dots singleton classes. 
The best example is dotsTheMachineSettings and dotsTheModeManager.  After
loading new machine settings (e.g. from file) it probably makes sense to
reset the mode manager, so that it reflects the new settings.

dotsMachineSettings.reset is wrong for the job because it boot out all
objects that belong system and object to modes.

So should dotsMachineSettings have a refresh method?  Should
dotsTheModeManager call this automatically after loading new settings?  Or
would this be invasive?  Is there a case when it makes sense to load a
batch of settings without applying all the changes?  I'm thinking not,
since machine settings are supposed to be associated with initialization.

Original issue reported on code.google.com by Benjamin.Heasly on 21 Nov 2009 at 6:03

GoogleCodeExporter commented 8 years ago
So far this has not been a huge problem.

The worst has been with testing the drawables manager, where setUp and tearDown 
have to do some things in reverse order to correctly manage the screen.

Original comment by Benjamin.Heasly on 16 Feb 2010 at 10:58

GoogleCodeExporter commented 8 years ago
This still has not been a problem.  I'm not going to address it specifically 
unless it comes up again.

Original comment by Benjamin.Heasly on 3 Aug 2010 at 5:52