[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: luainterface problems
- From: Greg Fitzgerald <garious@...>
- Date: Tue, 10 May 2005 18:40:02 -0700
Hi, I'm new to Lua, LuaInterface, and this email list. I'm having
some trouble with LuaInterface and was hoping someone might be able to
help me out.
First problem:
I can't seem to import System.String or System.Int32:
luanet = require("luainterface")
luanet.load_assembly("System")
Int32 = luanet.import_type("System.Int32")
print(Int32) => nil
but all imports of objects in System.Windows.Forms and System.Drawing
seem to work fine so far.
Second problem:
luanet = require("luainterface")
luanet.load_assembly("System.Windows.Forms")
Image = luanet.import_type("System.Windows.Forms.Image")
myImage = Image.FromFile( "myImage.bmp" ) => LuaInterface
throws an exception saying: invalid arguments to method call
The file is definitely there and I've tried it with an absolute path
and it still doesn't work. I've also tried the absolute path in C#
and verified that it works there.
I think the problem is that lua's string is different than .NET's
string and so luainterface isn't able to determine which overload of
FromFile to use. To troubleshoot this, I tried to import
System.String and convert it to that before passing it to FromFile,
but since that import doesn't work as described above, I'm stuck.
Any ideas?
Thanks,
Greg