Hello world ...
In order to learn about programming in XPCOM i tried to make an Hello
World program ...
With the idea a follow first the weblock tutorial (for the people who
know that) ...
Great I managed to load my components at startup (who write to the
console a "creation message") ... Wonderful ... I had wanted to go a
little deeper and for exemple to write to the console when a new entry
is created in the History ... and ... errr ... i'm lost ...
I don't even create the listener but just include the
nsISHistoryListener and nsISHistory and told to the program that I
depend from those interface and nothing works anymore ... it compile
... but that's all ... I really don't understand ...
Here is the code interesting (I put some '*' in order to show what I
add and if i remove the part of the code between * then the component
load himself)
in hello.h
class Hello : public IHello *, public nsISHistory, public
nsISHistoryListener*, public nsIObserver {
public:
NS_DECL_ISUPPORTS ;
* NS_DECL_NSISHISTORY ;
NS_DECL_NSISHISTORYLISTENER ; *
NS_DECL_NSIOBSERVER ;
and in hello.cpp
NS_IMPL_ISUPPORTS4(Hello, nsIObserver, IHello*, nsISHistoryListener,
nsISHistory* ) ;
And after that it's not working ....
Help ...
And if a guy have a great tutorial about adding a listener (for the
purpose i explain abovefor example) it would be great ....
Thank a lot to everybody
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom