Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > invoke BeanShell

Thread Tools

invoke BeanShell

Posts: n/a

I want to be able to handle any operation done on a javascript object
regardless of where the operation exists or not. I want to handle all
operations on a given object myself. In BeanShell I can do this since
they offer the invoke operation which catches all calls not
implemented by my objects. Is there a way to do this in JavaScript and
in perticular with Rhino?

This is what I can do in BeanShell:

Test() {
invoke(name, args) {
print("you called: " + name);
return this;

var test = Test();

eris:~/tmp > bsh test.bsh
you called: fooBar

Can something similar be done in JS? Could this be done in Rhino? If
not could I modify Rhino's source code and be able to achieve this

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[BeanShell] Setting the look and feel Robert Java 0 07-06-2004 01:10 PM
What can BeanShell do for Remote Debugging? vnssoftware Java 0 02-04-2004 10:33 PM
BeanShell Interpreter ImportCommands() Problems Michael Pitoniak Java 1 12-20-2003 07:25 PM
Beanshell - assignment operator not working? Wolfgang Groiss Java 0 11-19-2003 03:56 PM
[BEANSHELL] Extends SOl Java 0 07-19-2003 06:12 PM