RE: [Flashcoders] Singleton and Listeners is a bad combination

2005-10-31 Thread Martin Klasson
artin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: den 28 oktober 2005 15:27 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Singleton and Listeners is a bad combination I'd break this up into two classes. A font lo

Re: [Flashcoders] Singleton and Listeners is a bad combination

2005-10-28 Thread grant
ashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: 10/28/05 6:32 AM Subject: RE: [Flashcoders] Singleton and Listeners is a bad combination > That is exactly what has crossed my mind. > I think I will have to do it just like that. > > I just finished up my singleton now,

RE: [Flashcoders] Singleton and Listeners is a bad combination

2005-10-28 Thread Martin Klasson
ng me ;) / martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nils Millahn Sent: den 28 oktober 2005 12:30 To: Flashcoders mailing list Subject: Re: [Flashcoders] Singleton and Listeners is a bad combination Hiya, I reckon that it would be a good

Re: [Flashcoders] Singleton and Listeners is a bad combination

2005-10-28 Thread Nils Millahn
Hiya, I reckon that it would be a good idea not to make it a singleton but create new instances every time. The fact that you are running into the problem with listeners is a pretty clear indication that you require new instances to be created for every use of the class - not really the right

RE: [Flashcoders] Singleton and Listeners is a bad combination

2005-10-27 Thread Martin Klasson
asses. / martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James O'Reilly Sent: den 28 oktober 2005 08:05 To: Flashcoders mailing list Subject: Re: [Flashcoders] Singleton and Listeners is a bad combination Maybe I'm misunderstanding the implem

Re: [Flashcoders] Singleton and Listeners is a bad combination

2005-10-27 Thread James O'Reilly
Maybe I'm misunderstanding the implementation of the Singleton but I thought a statement like this was impossible? Doesn't the singleton have a private constructor that only a public method such as getInstance() can access? I didn't think you could use "new" outside of the class itself like y

RE: [Flashcoders] Singleton and Listeners is a bad combination

2005-10-27 Thread Martin Klasson
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: den 28 oktober 2005 06:29 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Singleton and Listeners is a bad combination Does your font loader load differen fonts for different client objects and

Re: [Flashcoders] Singleton and Listeners is a bad combination

2005-10-27 Thread grant
flashcoders@chattyfig.figleaf.com Sent: 10/27/05 3:29 PM Subject: Re: [Flashcoders] Singleton and Listeners is a bad combination > On 10/27/05, Martin Klasson wrote: > > > > > > I got a class which I thought would be improved by using the Singleton > > pattern. And it doe

Re: [Flashcoders] Singleton and Listeners is a bad combination

2005-10-27 Thread Alan Shaw
On 10/27/05, Martin Klasson <[EMAIL PROTECTED]> wrote: > > > I got a class which I thought would be improved by using the Singleton > pattern. And it does, until I am adding in the EventDispatcher. > > The problem is that my application will using the FontLoader.getInstance() > at several places in

[Flashcoders] Singleton and Listeners is a bad combination

2005-10-27 Thread Martin Klasson
Hi Coders. I got a class which I thought would be improved by using the Singleton pattern. And it does, until I am adding in the EventDispatcher. The problem is that my application will using the FontLoader.getInstance() at several places in different classes and files. The problem arise