Hi Scott,

Great idea! I've seen this sometimes in code but I never stop to think
a bit about it, I'll try to implement in my singelton managers and
classes too, thanks!

: )

2005/6/23, Scott Whittaker <[EMAIL PROTECTED]>:
> Hi Pablo,
> 
> One suggestion for your logger: while it is cool to allow singleton access
> with Logger.getInstance() it is even cooler if you make the Singleton access
> private and call it from within the public static methods of the Logger.
> 
> For example, instead of requiring the syntax:
> 
> Logger.getInstance().log ("message");
> 
> You can shorten it to:
> 
> Logger.log ("message");
> 
> And inside your public static "log" method make the call to the private
> "getInstance" method. I have used this pattern in a few of my static Manager
> classes and it works really well and makes your code neater. I've never seen
> anyone else do this, I don't know if it is considered "bad form" or anything
> but it works great for me  :)
> 
> Kind regards,
> 
> Scott W.
> 
> _________________________________________________________________
> Need a new job? Check out XtraMSN Careers http://xtramsn.co.nz/careers
> 
> _______________________________________________
> osflash mailing list
> [EMAIL PROTECTED]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
> 


-- 
::| Carlos Rovira
::| http://www.carlosrovira.com

_______________________________________________
osflash mailing list
[EMAIL PROTECTED]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to