[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re:  settagmethod [setglobal]
From:       Luiz Henrique de Figueiredo <lhf () tecgraf ! puc-rio ! br>
Date:       1999-06-30 3:17:08
Message-ID: 199906300317.AAA09357 () gauguin ! tecgraf ! puc-rio ! br
[Download RAW message or body]

>From lua-l@tecgraf.puc-rio.br Tue Jun 29 22:52:51 1999
>From: Richard Sun <scritch@lucasarts.com>
>
>I'm trying to set the tag method for "setglobal" to a function of my own.
>However, the 2nd argument to setglobal, the new value, is always coming up
>nil.  Does anybody have any idea why this is, and how to fix it?
>
>here's the important parts of the code in question:
>
>function new_setglobal(x, val)
> ...
>end
>
>settagmethod(tag(nil), "setglobal", new_setglobal)

the signature of the "setglobal" tag method is

	Tsetglobal(name,old,new)

so, the new value is the third arg, not the second.
--lhf

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic