cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@apache.org>
Subject Re: Scriptable objects with BeanShell
Date Mon, 24 Nov 2003 20:26:54 GMT
Le Lundi, 24 nov 2003, à 21:05 Europe/Zurich, Upayavira a écrit :
> ...From looking at the BeanShell docs, the Java is definitely 
> 'scripted' java, and lacks Java's object orientedness...

But what about this example from the BeanShell docs:

buttonHandler = new ActionListener() {
     actionPerformed( event ) {
         print(event);
     }
};

button = new JButton();
button.addActionListener( buttonHandler );
frame(button);

A new behaviour for ActionListener is indeed created in a script.
Isn't this a good example of object orientedness, do you have a 
counterexample?

-Bertrand


Mime
View raw message