Author Topic: LuaNet problems  (Read 1829 times)

0 Members and 1 Guest are viewing this topic.

Offline Amro

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
LuaNet problems
« 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!

PtokaX forum

LuaNet problems
« on: 21 August, 2005, 15:00:11 »

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
(No subject)
« Reply #1 on: 21 August, 2005, 15:08:55 »
You mean this?
Everything could have been anything else and it would have just as much meaning.

PtokaX forum

(No subject)
« Reply #1 on: 21 August, 2005, 15:08:55 »