lua-users home
lua-l archive

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


Well well well,

I'm still facing a nasty problem that drive me nut :(

In the slave, I'm able to retrieve my object and when I display its metatable, it's  displaying my methods :
local fifo = SelFIFO.Find("toto")
local mt = getmetatable(fifo)
for k,v in pairs(mt) do print(k,v) end

result :
dump    function: 0x14ddf50
list    function: 0x14ddf70
Pop    function: 0x187d360
__index    table: 0x1762aa8
Push    function: 0x1762ad0

but when I'm calling them
fifo:dump()

it's saying

/home/laurent/Toile/Inputs/20_MQTTLog.lua:25: attempt to call method 'dump' (a nil value)

I can't understand how the metatable can be filled whereas calling member raise an error :(

Any tip welcome :)

Laurent



Le Jeudi 22 juin 2017 23h29, Laurent FAILLIE <l_faillie@yahoo.com> a écrit :


ok, for checkSelFIFO(), I keep it in my todo list.

About assert() : you're right. I'll convert it to an Lua error raising.

Anyway, as SelFIFO is working well, I'm now able to move ahead with my smarthome dashboard. Thanks again.