lua-users home
lua-l archive

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


Hello, 

        I think I might have found a bug in luaInterface 1.3.0, but I'm not sure.  I was wondering if anyone here has ever run across this problem. 

I have created a class that has a lot of functions defined that I am registering with Lua and it seems that when I have more than 33 functions registered I get a System.Exception whenever I execute DoString();  

Here's a link to the Virtual Machine class that I setup.

http://moya.bus.miami.edu/~emil/lua/rdVMVirtualMachine.cs

Here is the script I am trying to run.

http://moya.bus.miami.edu/~emil/lua/form_alt.lua

 

When I don't register any functions, then the script runs perfectly.

When I only register 33 functions, then the script runs perfectly.

When I register all of the functions, then I get the following exception:

"Unable to execute command: Forms=luanet.System.Windows.Forms

Form=Forms.Form
Button=Forms.Button
Point=luanet.System.Drawing.Point

form1=Form()
button1=Button()
button2=Button()

function handleClick(sender,data)
  if sender.Text==\"OK\" then
      sender.Text=\"Clicked\"
   else
      sender.Text=\"OK\"
    end
    
    button1.MouseUp:Remove(handler)
    print(sender:ToString())
end
      
button1.Text = \"OK\"
button1.Location=Point(10,10)
button2.Text = \"Cancel\"
button2.Location=Point(button1.Left, button1.Height + button1.Top + 10)
handler=button1.MouseUp:Add(handleClick)
form1.Text = \"My Dialog Box\"
form1.HelpButton = true
form1.MaximizeBox=false
form1.MinimizeBox=false
form1.AcceptButton = button1
form1.CancelButton = button2
form1.Controls:Add(button1)
form1.Controls:Add(button2)
form1:ShowDialog()
      : Object reference not set to an instance of an object.
         at LuaInterface.LuaDLL.lua_settop(IntPtr luaState, Int32 newTop)
         at LuaInterface.Lua.DoString(String chunk)
         at rdDXGrafixLibrary.VirtualMachine.rdVMVirtualMachine.executeCommand(String sCommand) in c:\\source\\rddxgrafixlibrary\\rdvmvirtualmachine.cs:line 93

 

Please let me know if you have any ideas on what is causing the problem, or where i can look to get it resolved.  Thank in advance for your help.

Emil Diego 


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.12/192 - Release Date: 12/5/2005
 

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.12/192 - Release Date: 12/5/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.12/192 - Release Date: 12/5/2005