[Iup-users] bug with iup and table insert?
Merick
Merick_TeVaran at comcast.net
Wed Oct 10 13:17:22 GMT+3 2007
Alright, I downloaded the pre-compiled iup console and this works fine
with that, so it looks like the problem is with the custom interpreter
I'm building with FreeBasic. I'm using the pre-compiled lua libs that
come packaged with FB, so I guess I'll have to start looking for the
problem there first
Antonio Scuri wrote:
> I changed your code to:
>
> button = iup.button{title = "table.insert()"} function button.action()
> test = {}
> print(test, test[1])
> table.insert(test, 1)
> print(test, test[1])
> return iup.DEFAULT
> end
>
> dlg = iup.dialog{button}
>
> dlg:popup(iup.CENTER, iup.CENTER)
>
> And run it from the standard IupLua console in Windows. It outputs:
>
> table: 027F1410 nil
> table: 027F1410 1
>
> As expected.
>
> Maybe you are getting regular Lua errors but the error handler is bad.
>
> Best,
> scuri
>
>
>> -----Original Message-----
>> From: iup-users-bounces at lists.luaforge.net
>> [mailto:iup-users-bounces at lists.luaforge.net] On Behalf Of Merick
>> Sent: quarta-feira, 10 de outubro de 2007 11:11
>> To: IUP discussion list.
>> Subject: Re: [Iup-users] bug with iup and table insert?
>>
>> Antonio Scuri wrote:
>>
>>> I took a look at your first example but it was too big.
>>>
>>> Can you make a more simple example so I can debug the
>>>
>> situation here?
>>
>>> Best,
>>> scuri
>>>
>>>
>>>
>> Here, try this one:
>>
>> button = iup.button{title = "table.insert()"} function button.action()
>> test = {}
>> table.insert(test, 1)
>> return iup.default{}
>> end
>>
>> dlg = iup.dialog{button}
>>
>> dlg:popup(iup.CENTER, iup.CENTER)
>>
>> iup.MainLoop()
>>
>>
>> When I run this script, it will pop up the dialog with the
>> button, but when you click the button it crashes my interpreter
>>
>> _______________________________________________
>> iup-users mailing list
>> iup-users at lists.luaforge.net
>> http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users
>>
>>
>
>
> _______________________________________________
> iup-users mailing list
> iup-users at lists.luaforge.net
> http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users
>
>
>
More information about the iup-users
mailing list