PtokaX forum

Development Section => Your Developing Problems => Topic started by: Amro on 21 August, 2005, 15:00:11

Title: LuaNet problems
Post by: Amro on 21 August, 2005, 15:00:11
not sure if this is the right place to post this...

using LuaInterface and NetLua, I can't :Add to my own events. For example:

luanet.load_assembly("System.Windows.Forms")

Button = luanet.import_type("System.Windows.Forms.Button")

myButton = Button();

--now I can add a handler to the buttons click, like

handler = myButton.Click:Add(somefunctionname);

however, if I use my own class with it's own event, it doesn't work. I think there's something wrong with the way I declare events (although in C# they work fine):

luanet.load_assembly("MyNamespace")

MyClass= luanet.import_type("MyNamespace.MyClass")

myClassInstance = MyClass();

handler = myClassInstance.Click:Add(somefunctionname);

I get the error: no such value.Add.

Any help would be appreciated!
Title:
Post by: bastya_elvtars on 21 August, 2005, 15:08:55
You mean this (http://www.angelfire.com/games3/dohsoft/projects.html)?