I don't know why this was in my mailbox this morning!-- BEGIN included message.
-- END included message
- To: vrml-behaviors@sdsc.edu
- Subject: Cosmo External Interface
- From: Ginnie Games <ginnie@nosc.mil>
- Date: Wed, 15 Jan 1997 16:08:46 -0800
- Content-Type: text/plain; charset="us-ascii"
- Sender: owner-vrml-behaviors@SDSC.EDU
I am trying to use Java to interact with VRML nodes. I am using Cosmo Player 1.0b3, and their interface requires getting a reference to the browser from within Java code. All the samples I can find use the following: JSObject win = JSObject.getWindow(this); JSObject doc = (JSObject) win.getMember("document"); JSObject embeds = (JSObject) doc.getMember("embeds"); browser = (Browser) embeds.getSlot(0); I don't think this Java code is specific to Cosmo, but it is specific to Netscape (>3.0). However, every time I try this I get this error: java.lang.classCastException: vrml.external.Browser It seems that the value returned from "embeds.getSlot(0)" cannot be legally cast to the Browser class. Has anyone else experienced this problem? Or has anyone had success with the above code snippet? Please let me know. Thank you, Ginnie Games Software Developer NRaD ------------------------------------------------------------------- *** Please send administrative requests to <majordomo@sdsc.edu> *** -------------------------------------------------------------------