Re: [Pharo-users] Chronos Manager Singleton

2017-02-05 Thread Dimitris Chloupis
Very interesting read Ben thanks for sharing By the way I added the singleton and I optimised the loading of some image files. More optimizations will follow the next weeks. So now you should not be annoyed with multiple instances of ChronosManager Thank you all for your interest in

Re: [Pharo-users] Chronos Manager Singleton

2017-02-05 Thread Ben Coman
On Sun, Feb 5, 2017 at 8:32 AM, Cyril Ferlicot D. wrote: > Le 05/02/2017 à 01:08, Dimitris Chloupis a écrit : >> The initial intention was to not make it a singleton to allow for >> multiple instances of timers. Hence why it's wiped out. But making it a >> singleton is

Re: [Pharo-users] Chronos Manager Singleton

2017-02-05 Thread Dimitris Chloupis
> > I could see some use cases there. My intention was just not to have to set > time/break limits on every open. Another option would be to lazily > initialize those defaults into class vars instead of hardcoding... > > Well my intention also was to provide a way to save preset settings and

Re: [Pharo-users] Chronos Manager Singleton

2017-02-05 Thread Dimitris Chloupis
The idea was to use this as a fail safe in case you lost the reference to your instance. Singleton does not prevent you to have two or more instances existing at the same time cause this is standard behavior for OOP. What it does is making sure that it avoid unintentional creation of instances.

Re: [Pharo-users] Chronos Manager Singleton

2017-02-04 Thread Sean P. DeNigris
kilon.alios wrote > The initial intention was to not make it a singleton to allow for multiple > instances of timers. I could see some use cases there. My intention was just not to have to set time/break limits on every open. Another option would be to lazily initialize those defaults into class

Re: [Pharo-users] Chronos Manager Singleton

2017-02-04 Thread Cyril Ferlicot D.
Le 05/02/2017 à 01:08, Dimitris Chloupis a écrit : > The initial intention was to not make it a singleton to allow for > multiple instances of timers. Hence why it's wiped out. But making it a > singleton is something Phil asked for too, I just forgot to turn it into > a singleton. I will update

Re: [Pharo-users] Chronos Manager Singleton

2017-02-04 Thread Dimitris Chloupis
The initial intention was to not make it a singleton to allow for multiple instances of timers. Hence why it's wiped out. But making it a singleton is something Phil asked for too, I just forgot to turn it into a singleton. I will update it tomorrow. I use only a single instance myself as well

[Pharo-users] Chronos Manager Singleton

2017-02-04 Thread Sean P. DeNigris
Shouldn't the following be lazily initialized? ChronosManager class>>#open ChronosInstance := self new. ^ChronosInstance Right now the singleton gets wiped out every time "open" is clicked in the world menu, and one has to recustomize e.g. time and break limits... - Cheers, Sean --