[EMAIL PROTECTED] wrote:
Hi,
When I try to create an nsITimer timer object in my XPCOM component it
fails with a return value of NS_ERROR_NO_INTERFACE. I'm using Firefox
1.5. The code snippet below is how I'm creating the timer. I'm using
gecko sdk 1.8b1.  The nsITimer header was created from the nsITimer IDL
that I got from the Mozilla 1.81b source.
Previously this code had worked when compiled against gecko 1.7.5 and
executed by Firefox 1.0.2!
Any ideas what's wrong?

The nsITimer interface changed between 1.8b1 and 1.8, and therefore the IID was revised.

http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/xpcom/threads/nsITimer.idl&rev=MOZILLA_1_8_BRANCH

Non-frozen interfaces (such as nsITimer) are subject to change between versions, and if you're using them in code that needs to work with multiple versions of the browser you may need special techniques to be compatible versions of the interfaces (e.g. taking nsITimer.h from the gecko 1.7 SDK and renaming the class nsITimer_17, and doing a similar thing for gecko 1.8, and then QIing to either interface to see which one is supported).

--BDS
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to