It gets even more peculiar. If I print the table keys and values the
key==userdata evaluates to true but accessing the table with each of them
gives different results i.e. data[key] ~= data[userdata]. I have attached
the updated script.




On Wed, Sep 3, 2014 at 7:20 PM, Milind Gupta <[email protected]> wrote:

> Sorry, the right attachment is this one:
>
>
> On Wed, Sep 3, 2014 at 7:15 PM, Milind Gupta <[email protected]>
> wrote:
>
>> Hi,
>>      I am using the element handle of a multiline text control as a key
>> in a table (data). But when the table is accessed in the map_cb function
>> (called when the control is mapped) the value for that key is somehow lost!
>>     I have the test case in the attached script. The print statements
>> show that the right key is passed to the map_cb function but the table
>> shows a nil value at that time.
>>      What am I doing wrong?
>>
>> Thanks,
>> Milind
>>
>
>

Attachment: table_loosing_value.lua
Description: Binary data

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to