Subj : Simple request for verification of Rhino's abilities To : netscape.public.mozilla.jseng From : lynn Date : Tue May 11 2004 06:20 am I'm considering using Rhino as a scripting engine for a Java application I'm creating. If you are familiar with LPMUD, you know that it is designed with a C driver and a MUDlib written in LPC, a compiled-interpreted language. This allows players of the game some level of ability (granted by game administrators) to code parts of the game. If the whole thing were written in C, such coding would be able to access the entire system, whereas LPC runs in somewhat of a sandbox. I'm planning to do something similar and would like to use Rhino and Javascript to substitute for the LPC portion. I understand from what I've read that I can limit and even cut off altogether the LiveConnect capabilities of Rhino to call out directly to Java classes, which is nice. And I also have the security policy settings of the JVM itself at my disposal, so I don't want for security. What I need to know has to do with inheritance. From what I understand, a scope doesn't inherit in the "IS-A" sense but rather in the "HAS-A" sense, using prototypes. What I would like to be able to do is to set up somewhat of an heirarchy for this inheritance, but all in separate JS files. For example, I might have object.js, room.js, and kitchen.js. kitchen.js inherits from room.js which in turn inherits from object.js. But I'm going to have to load kitchen.js first. Would I be able to somehow tell kitchen.js to load room.js (and room.js to load object.js) in a recursive fashion until all dependencies are satisfied? A #include mechanism isn't what I'm looking for as I really need the prototyping abilities to override function definitions and so forth. Is this something built into Rhino/JS or will I have to implement this on my own somehow? This seems something that would be a fairly common need. I've looked at the examples on http://www.mozilla.org/rhino and didn't see anything that would help me out in this case. Any help will be appreciated. Regards, Lynn Pye l y n n A@T p y e h o u s e .d o t. c o m .