canmove, Confirmed users, Bureaucrats and Sysops emeriti
2,798
edits
No edit summary |
MarkFinkle (talk | contribs) No edit summary |
||
| Line 7: | Line 7: | ||
Good luck whatever you do! :-) | Good luck whatever you do! :-) | ||
[[User:GijsKruitbosch|GijsKruitbosch]] 23:38, 7 January 2007 (PST) | [[User:GijsKruitbosch|GijsKruitbosch]] 23:38, 7 January 2007 (PST) | ||
Regarding the services, I was thinking about a singleton pattern to cache the service after the first "get": | |||
<pre> | |||
// somewhere in the impl | |||
_os : null, | |||
Observer() : function() { | |||
if (_os == null) { | |||
// get the service from XPCOM | |||
} | |||
return _os; | |||
} | |||
</pre> | |||
Thanks for the feedback and ideas. Keep it coming! | |||
[[User:MarkFinkle|MarkFinkle]] 19:30, 9 January 2007 (PST) | |||