Subj : RE: disabling toString() and toSource() for functions To : netscape.public.mozilla.jseng From : Merten Schumann Date : Wed Jan 19 2005 01:36 pm Igor, thanx - works fine! :-) I do get for my function "createJSObject()" function createJSObject() { [native code, arity=4] } BTW: what does this "arity=" mean? cu Merten > -----Original Message----- > From: mozilla-jseng-admin@mozilla.org > [mailto:mozilla-jseng-admin@mozilla.org] On Behalf Of Igor Bukanov > Sent: Wednesday, January 19, 2005 11:55 AM > To: mozilla-jseng@mozilla.org > Subject: Re: disabling toString() and toSource() for functions > > Merten Schumann wrote: > > Hm, interesting. Just tried it in Rhino, it works, code of > my "hidden" > > functions is printend. So users can see what internal > variables and all > > I do use there ... Hmmm. > > > > Would be really nice to have something to prevent this > > toString()/toSource() stuff, if needed! By overloading the > > toString()/toSource() or so, but how to do this for > functions? Something > > like the ClassShutter mechanism would be helpful ... > > Use contextInstance.setGeneratingSource(false), > http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/Co > ntext.html#setGeneratingSource(boolean) > > Regards, Igor > _______________________________________________ > mozilla-jseng mailing list > mozilla-jseng@mozilla.org > http://mail.mozilla.org/listinfo/mozilla-jseng > .