On Monday 20 August 2007, Martin Burchard wrote: Hello Christian,
> > How does getFrames fail and how are you calling it? What you showed > > previously in this thread doesn't call that function. The problem is that the field 'frames' is marked as non-script and therefore not generated in the Java interface: /** * Accessor for the child windows in this window. */ [noscript] readonly attribute nsIDOMWindowCollection frames; There is a related bug for this issue already posted for JavaXPCOM in bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=340009 A temporary workaround is to manually add the method into the nsIDOMWindow.java, compile and replace the original version in MozillaInterfaces.jar best regards, Michal > Hello Christian, > > I know, the the MozillaInterfaces.jar only has interfaces. But that's > nevertheless the Java API I'm talking about. > I wonder how you are able to write your code when the interface of the > nsIDOMWindow doesn't define a getFrame Method? > It's not possible in Java. > Don't know if you know Java or SWT but when an Interface doesn't define > a method you can't use this method. > > Let me show you some code how this works in Java using SWT... > > browser = new Browser(parent, SWT.MOZILLA); > nsIWebBrowser webBrowser = browser.getWebBrowser(); > nsIDOMWindow window = webBrowser.getContentDOMWindow(); > // window.getFrames(); is not possible because nsIDOMWindow doesn't has > this method defined... > > Regards Martin > > Christian Biesinger schrieb: > > Martin Burchard wrote: > >> That may be, but the implementation of nsIDOMWindow in the > >> MozillaInterfaces.jar does not support the Method getFrames. > >> That's why I'm asking. > >> It would be absolutely wonderful if Mozilla would have a well documented > >> Java API... But there are much differences between the interface > >> documentation and the delivered jar file. > > > > MozillaInterfaces.jar does not have any implementations, it has only > > interfaces. The implementations are in the C++ code. > > > > How does getFrames fail and how are you calling it? What you showed > > previously in this thread doesn't call that function. > > _______________________________________________ > dev-tech-xpcom mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-xpcom _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
