cbuschka / beanshell2

Automatically exported from code.google.com/p/beanshell2
0 stars 0 forks source link

Interpreter.setu vs. set #64

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Declare the setu method will be very nice to allow to set args from another 
main.
ie :

 public static void main(String[] args) {
Interpreter interpreter = new Interpreter();
interpreter.setu( "bsh.args", bshArgs );
}

or maybe add a setArgs method will be better.

Original issue reported on code.google.com by erwan.bo...@gmail.com on 11 Feb 2012 at 6:58

Attachments:

GoogleCodeExporter commented 8 years ago
Hm, there are already public methods availble for this purpose, e.g. 
"set(String, Object)".
Why can't you use this method?

Original comment by pejob...@gmail.com on 13 Feb 2012 at 3:33

GoogleCodeExporter commented 8 years ago
 You are right. Being absent-minded.Sorry.

Original comment by erwan.bo...@gmail.com on 13 Feb 2012 at 8:00

GoogleCodeExporter commented 8 years ago
By the way, I forgot to said. Thank you very much for BeanShell2. It's a very 
usefull scripting lib.

Original comment by erwan.bo...@gmail.com on 13 Feb 2012 at 8:22

GoogleCodeExporter commented 8 years ago
Change state to "invalid". Perhaps it will be good to rename "setu" to 
something which is more clearly reflecting it's 'internal nature'. Using the 
prefix "_" is very common, so new name would be "_set", also leading to the 
corresponding public method.

Original comment by pejob...@gmail.com on 14 Feb 2012 at 7:00