RE: [Flashcoders] Singleton in AS3

2005-11-14 Thread zwetan
Have anyone got ideas how to implement Singleton pattern in AS3 best? Constructor in AS3 can only be public or internal, which is not private anyway. .. Well, internal should be enough to implement a Singleton Just have a public const in the package initialized with an internal class of

RE: [Flashcoders] Singleton in AS3

2005-11-14 Thread zwetan
They do. With internal access modifier you're still able to create an instance of class directly. Not outside of the package, or if you have a code exemple That show that behaviour I would be interested to see it. zwetan ___ Flashcoders mailing

Re: [Flashcoders] Singleton in AS3

2005-11-11 Thread JesterXL
You can't yet as for the reason you stated. Bitch on the forums pretty please; you, many many others, and I all want this changed. http://www.macromedia.com/cfusion/webforums/forum/categories.cfm?catid=587entercat=y - Original Message - From: Michael Klishin [EMAIL PROTECTED] To:

RE: [Flashcoders] Singleton in AS3

2005-11-11 Thread Chris Wilson
(), but if you're writing the code, you'll do it the proper way anyhow, no? -Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: Friday, November 11, 2005 1:32 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Singleton in AS3 You can't yet

Re: [Flashcoders] Singleton in AS3

2005-11-11 Thread JesterXL
opinion to support it. - Original Message - From: Chris Wilson [EMAIL PROTECTED] To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com Sent: Friday, November 11, 2005 1:40 PM Subject: RE: [Flashcoders] Singleton in AS3 Why should a public constructor prevent the creation

RE: [Flashcoders] Singleton in AS3

2005-11-11 Thread Chris Wilson
PROTECTED] On Behalf Of JesterXL Sent: Friday, November 11, 2005 1:51 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Singleton in AS3 That's fine for use Flashers who are used to using such methods to get what we want. However, other languages are more strict, and from the perception

Re: [Flashcoders] Singleton in AS3

2005-11-11 Thread JesterXL
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: Friday, November 11, 2005 1:51 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Singleton in AS3 That's fine for use Flashers who are used to using such methods to get what we want. However, other languages are more strict

Re: [Flashcoders] Singleton in AS3

2005-11-11 Thread Michael Klishin
Chris Wilson wrote: Agreed on all points, but when the deadline is approaching and the code needs to be done... That said, I'm a pragmatist when it comes to finishing a project. :-] For sure. But as long as AS3 is going to become one of senior programming languages... ;) -- Michael

Re: [Flashcoders] Singleton in AS3

2005-11-11 Thread Luke Bayes
Have anyone got ideas how to implement Singleton pattern in AS3 best? Constructor in AS3 can only be public or internal, which is not private anyway Hey Michael, One way (as mentioned in another email) is to throw an error in the constructor if some restriction has not been met. The

Re: [Flashcoders] Singleton in AS3

2005-11-11 Thread JesterXL
for MXML (I think). - Original Message - From: Fruber Malcome [EMAIL PROTECTED] To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com Sent: Friday, November 11, 2005 10:24 PM Subject: RE: [Flashcoders] Singleton in AS3 There are many cases where you'd want to ensure