Subj : Create Object question To : netscape.public.mozilla.jseng From : Man Date : Wed Jun 01 2005 08:31 am Hi All, I'm really a novice with Rhino, and I have a very stupid question. I'd like to have in the global scope two things: 1) a function 2) an object The function returns a scriptable object the object is a scriptable objects. In both ways I need to create from Java a scriptable object that can be used via javascript in the global scope. What I did it was quite simple (and of course it doesn't work!) I created a function like that in the global scope: in the main I have: defineClass("MyScriptableObject"); then I have: public static MyScriptablObjecet get(Context cx, Scriptable thisObj, Object[] args, Function funObj) { return(new MyScriptableObject()); } Unfortunately the properties of the newly created object cannot be found?! Thanks in advance for every kind of help you may give. Man .