lua-users home
lua-l archive

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



* Running Hello, GTK!:
USES 'lib.gtk': already loaded.
window  nil	nil
vbox    nil	nil
hbox    nil	nil
label   nil	nil
entry   function: 0x51e620	function: 0x51e620
hseparator      nil	nil
button  nil	nil

I'm trying to make both
  	str= entry:get_text()
and
  	str= entry.text

to work with metatables (doing the same thing).

The former works, the latter not. It returns a function instead of _calling_ that function (to get the actual value) as supposed to by the Lua ref, right?


The dump in the beginning shows class name, 'mt.__index.text' and 'obj.text'.

Where am I getting this twisted??   Lua is 5.1w4.

-ak