Lostgallifreyan <z.c...@...> writes:

> 
> 
> Andre Arpin <ar...@...> wrote:
> (29/12/2010 21:42)
> 
> >sp:Connect(wx.wxEVT_KILL_FOCUS,
> >    function(event)
> >        print('k')
> >    end)
> >    
> 
> Thanks again for this, it works great.
> 
> I had to modify it to this:
> 
> for I=7,151 do
>   CT[I]:Connect(wx.wxEVT_KILL_FOCUS,
>     function(EV)  FeedBack(EV:GetId())  end
>   )
> end
> 

> What about:
local function KILL_FOCUS(EV)  FeedBack(EV:GetId()

for I=7,151 do
   CT[I]:Connect(wx.wxEVT_KILL_FOCUS, KILL_FOCUS)
end


151 pointers to one function

better 

function FeedBack(event)
   local Id = event.Id
   ..... old code for feed back
end

for I=7,151 do
   CT[I]:Connect(wx.wxEVT_KILL_FOCUS, FeedBack)
end

Andre


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to