On 3/20/06, Sonja Duijvesteijn <
[EMAIL PROTECTED]> wrote:
Hi all,
I'm trying to make a singleton class as demonstrated below, but get the error: "a constructor may only be declared 'public'". Well, that error is clear, the reason for it is not however.
Isn't it possible anymore to make a singleton class, or is there another method for it?
Class Singleton {
private static var _instance:Singleton = null;
private function Sinleton() {
}
public static function getInstance():Singleton {
if(Singleton._instance == null) {
_instance = new Singleton();
}
return _instance;
}
}
Any help would be much appreciated.
Kind regards,
Sonja Duijvesteijn
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service .
--
j:pn
http://www.lennel.org
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

