Hello,

I am facing some very  serious issue. It is so trivial and surprising that i am wondering if this blocking behavior is intentional, and if yes why and how to by-pass it if possible:

--> clear File, clearglobal File
--> function test(), jimport java.io.File, disp(File), endfunction
--> test() // OK
class java.io.File
--> File
Undefined variable: File // So the File class is local. It is not returned to the caller, from the Scilab point of view.
--> File = 1;
--> test()
at line     1 of function test
jimport: An error occurred: A variable with this name is already existing
!!!!

So jimport refuses to create a local Scilab mlist (class) on the reason that there is a Scilab variable with the same name in the */calling/* environment !

Since it's impossible to ensure that no /File/ variable is defined by some process in the (nested) callers up to the console level,/*jimport is definitely fragile*/.

Is this a bug, and is there any work-around?

Thanks
Samuel


_______________________________________________
dev mailing list
dev@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/dev

Reply via email to