>> On Thu, Feb 16, 2012 at 12:06 PM, Mike Richards
>>>
>>> function test() is declared in the current scope, and globally as
>>> filterform.test
>>>
>>> After fiddling around for a bit, it looks like wx.wxEvtHandler:Connect
>>> saves upvalues, but not the current function environment (scope), whic
Thanks,
Milind
On Thu, Feb 16, 2012 at 1:53 PM, Mike Richards wrote:
> Milind,
> You could also accomplish the same with a little less typing if you want:
>
> module(...)
> local _M = _M -- save the module table
>
> then in your event handler function it's just setfenv(1, _M)
>
> Mike
>
> On 2/
Milind,
You could also accomplish the same with a little less typing if you want:
module(...)
local _M = _M -- save the module table
then in your event handler function it's just setfenv(1, _M)
Mike
On 2/16/2012 4:42 PM, Milind Gupta wrote:
Hi Mike,
I agree a good practice is to declar
Hi Mike,
I agree a good practice is to declare things local, only for things
we want to access from outside unrestricted its easier not to declare them
local. So anyway what I ended up doing is having the first statement in my
event handler function as setfenv(1,package.loaded[modname]) wher
John and Milind,
function test() is declared in the current scope, and globally as
filterform.test
After fiddling around for a bit, it looks like wx.wxEvtHandler:Connect
saves upvalues, but not the current function environment (scope), which
was set in the call to module(...)
When the event
Hello John,
Sorry for the carelessness. Here is a full set with minimal.lua
which is the main file to run and the module function is called by the
Help->About call back. That is true making test a local function makes it
work although I am not totally clear why but if you press the other
On Wed, Feb 15, 2012 at 3:14 AM, Milind Gupta wrote:
> Hello John,
>
> thanks for the reply. Here is an example code that does not work
Please try to provide enough code to make it run out of the box... I
had to add back GUI.initFrameH and rem out the usage of MainSizer to
make it even
Hello John,
thanks for the reply. Here is an example code that does not
work (Pasted below and attached the file as well). A function from the
main wxlua application calls filterFormActivate which sets up a simple
frame with 2 buttons and one static text and associates the button
click t
On Tue, Feb 14, 2012 at 10:09 PM, Milind Gupta 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
> itse
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
h
10 matches
Mail list logo