lua-users home
lua-l archive

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


> settagmethod( tag(myTag), "settable", myHook)


You shouldn't be calling tag(myTag), just myTag .. tag ()
gets you the tag of the object you pass into it. You only
need to do that if you want to get the tag of something.
Here you already have the value you need.


----- Original Message -----
From: "Steve Dekorte" <steve@dekorte.com>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Tuesday, June 20, 2000 9:08 PM
Subject: tags problem


>
> When I run this:
>
> -------------------------
>
> function myHook(table, index, value)
> end
>
> myTag = newtag()
> settagmethod( tag(myTag), "settable", myHook)
>
> print(tostring(gettagmethod(myTag, "settable")))
>
> -------------------------
>
> It prints "nil" when what I expected was a function.
> Can anyone see what I'm doing wrong?
>
> Steve
>
>