I made the changes according to your advice and now it works fine ! thank you very much for the big help out ! as for your suggestion ,i don't fully understand ,cause my goal is to implement an independant application based on xpcom ,with xulrunner and i want my xpcom --the MyComponent.dll also be able to response to the notifications both from dll and from javascript . if i don't inherit from nsIObserver ,then i don't know if there is another way to implement this ? (I already used the callbacks ,which is too unconvenient ,because everytime you want to add a new callback you have to modify your codes ,so i switched to nsIObserver ) ----- Original Message ----- From: "Boris Zbarsky" <[EMAIL PROTECTED]> Newsgroups: mozilla.dev.tech.xpcom Sent: Tuesday, August 01, 2006 1:57 PM Subject: Re: problem deploying nsIObserver in C++ and js
> Eric wrote: >> NS_IMPL_ISUPPORTS1(MyComponent, IMyComponent) > > This should probably be NS_IMPL_ISUPPORTS2(MyComponent, IMyComponent, > nsIObserver). Otherwise your component doesn't QI to nsIObserver. > > Also, I strongly recommend NOT inheriting your own interfaces from > interfaces you do not control. It causes problems later if mozilla.org > creates an interface inheriting from nsIObserver and you want to implement > both that and IMyComponent. There's no technical reason to have > IMyComponent inherit from nsIObserver that I can see.... > > -Boris _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
