lua-users home
lua-l archive

Re: LuaJava: Java method not found

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Another try: maybe because you are using
	JavaClass.setLuaObject(...);
instead of
	JavaClass:setLuaObject(...);
?
On 2002年11月28日, Carlos Cassino wrote:
> 
> Maybe because {Creator="Lua"} is not a Test instance
> as expected by setLuaObject?
> 
> -- Cassino
> 
> On 2002年11月28日, Andreas Rozek wrote:
> 
> > Hello!
> > 
> > When trying to run the following Lua code
> > 
> > local JavaClass = javaBindClass("Test");
> > JavaClass.setLuaObject({Creator="Lua"});
> > 
> > with Test.java =
> > 
> > public class Test {
> > public static Test LuaObject;
> > 
> > public static void setLuaObject (Test Candidate) {
> > LuaObject = Candidate;
> > };
> > };
> > 
> > I get the (Lua) error message
> > 
> > error: Test.setLuaObject not found.
> > stack traceback:
> > 1: method 'setLuaObject' [C]
> > 2: main of file 'test.lua' at line 2
> > 
> > Any ideas why?
> > 
> > Surprisingly, the method "setLuaObject" is found if
> > I define it without any arguments...
> > 
> > Thanks in advance for your help!
> 
> 
-- 
Carlos Cassino
Coordenador de Área
cassino@tecgraf.puc-rio.br
------------------------------------
Tecgraf/PUC-Rio
Rua Marques de Sao Vicente, 225
22453-900 Rio de Janeiro, Brasil
+55-21-2512-5984
------------------------------------

AltStyle によって変換されたページ (->オリジナル) /