In the cxc book, the weblock component implements self-defined interface, IWebLock. And the component registers itself to observe "xpcom-startup" event so that each time a mozilla is launched, one weblock instance is created. In the _javascript_ code, there is code:
 
var weblock = Components.classes["@dougt/weblock"].getService();
 
So I don't understand that when the weblock registers as a "service". Or calling "getService" here means return a reference to the already created weblock instance, which is created when the mozilla starts.  So in this case, only one weblock instance exists in the mozilla instance.
 
Would anyone like to explain it to me? thanks
 
banli


Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

Reply via email to