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
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
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:
(), 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
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
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
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
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
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
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
10 matches
Mail list logo