Hello :)
use internal keyword it's more easy :
http://groups.google.com/group/FCNG/browse_thread/thread/b16a38f8389803a0/8ff037af609e7b94#8ff037af609e7b94
text\Singleton.as
--
package test
{
public const Singleton:_Singleton = new _Singleton();
}
internal class _Singl
I am told private constructors should jsut work fine (in AS2 though)
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf So
Just a little error in the first code, it's not :
if (_oInstance == null)
but :
if (_oInstance != null)
I think you have rectify by yourself ;)
> That is nice, I like how you can assign functions to compile time
> variables.
>
> On 7/9/06, Cédric Néhémie <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
That is nice, I like how you can assign functions to compile time variables.
On 7/9/06, Cédric Néhémie <[EMAIL PROTECTED]> wrote:
Hi,
I've trying to create singleton, and the best way i've fund is to create
the instance direcly in the class declaration
private static var _oInstance:MyClass =
Hi,
I've trying to create singleton, and the best way i've fund is to create
the instance direcly in the class declaration
private static var _oInstance:MyClass = getInstance();
And to check if constructor is called in code I do that :
public function MyClass ()
{
if (_oInstance == null)
5 matches
Mail list logo