From: John L. <jla...@gm...> - 2012-02-15 04:37:38
|
On Tue, Feb 14, 2012 at 10:09 PM, Milind Gupta <mil...@gm...> wrote: > Hi, > I wonder if this is a known issue or something intentional. I have > made a module that creates a frame with some buttons and associates an event > handling function for the button click, the function resides in the module > itself. The frame also is visible in the module. Now when the event handler > is called the event handler function is executed in the global environment > rather than the module environment hence it is not able to see the variables > and functions of the module. > Does this mean event handler functions cannot be in a module? It should be able to work and the environment is saved when the event:Connect() is handled. Upvalues work for sure. Do you have some simple example code of this for me to try. Regards, John |