Quantcast

version 2.0b4 and reloadClasses command

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

version 2.0b4 and reloadClasses command

Jeff Qunfei Ma
Hi


I found a bug  or nicely speaking a feature no more available at 2.0b4 version.
the method you can not redefine anymore.

take the example of the following

actionPerformed(e) { print("hello"); }
button = new JButton("Click me");
button.add(this);
frame(button);

Then you try to redefine
actionPerformed(e) { print("bye"); }

but beanshell still print out "hello" not "bye" when you click the button. (I saw only this problem only in 2.0b4 version)


Also I found an interesting issue with command relaodClasses.
it works only at the first time. but when you modify and reload again, it won't work.


thanks

Jeff

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: version 2.0b4 and reloadClasses command

David Lee
The workaround of this bug is to add the type of "e"
 
actionPerformed(String e) { print("hello"); }
button = new JButton("Click me");
button.add(this);
frame(button);

Then you try to redefine
actionPerformed(String e) { print("bye"); }
 
 
Use any type ..
If args are untyped this bug is exposed, but if args are typed then it works right.
 
 
 
----- Original Message -----
Sent: Tuesday, April 15, 2008 12:29 PM
Subject: [Beanshell-users] version 2.0b4 and reloadClasses command

Hi


I found a bug  or nicely speaking a feature no more available at 2.0b4 version.
the method you can not redefine anymore.

take the example of the following

actionPerformed(e) { print("hello"); }
button = new JButton("Click me");
button.add(this);
frame(button);

Then you try to redefine
actionPerformed(e) { print("bye"); }

but beanshell still print out "hello" not "bye" when you click the button. (I saw only this problem only in 2.0b4 version)


Also I found an interesting issue with command relaodClasses.
it works only at the first time. but when you modify and reload again, it won't work.


thanks

Jeff


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone


_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Loading...