From: John L. <jr...@us...> - 2007-06-28 03:15:50
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15966/wxLua/samples Modified Files: controls.wx.lua Log Message: A little cleanup Index: controls.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/controls.wx.lua,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** controls.wx.lua 25 Jun 2007 19:44:56 -0000 1.9 --- controls.wx.lua 28 Jun 2007 03:15:34 -0000 1.10 *************** *** 1,5 **** ----------------------------------------------------------------------------- ! -- Name: picker.wx.lua ! -- Purpose: Picker wxLua sample -- Author: John Labenski -- Modified by: --- 1,5 ---- ----------------------------------------------------------------------------- ! -- Name: controls.wx.lua ! -- Purpose: Controls wxLua sample -- Author: John Labenski -- Modified by: *************** *** 136,140 **** skipEVTs = { ! ["wxEVT_PAINT"] = true, -- controls don't redraw if we connect to this in MSW, even if we Skip() it } --- 136,140 ---- skipEVTs = { ! ["wxEVT_PAINT"] = true, -- controls don't redraw if we connect to this in MSW, even if we Skip() it } *************** *** 298,301 **** --- 298,302 ---- function OnEvent(event) + local skip = true local evtClassName = wxlua.wxlua_typename(wxEVT_TableByType[event:GetEventType()].class_tag) local evtTypeStr = wxEVT_TableByType[event:GetEventType()].name *************** *** 311,315 **** -- during shutdown, we nil textCtrl since events are sent and we don't want them anymore if (not textCtrl) or ignoreEVTs[evtTypeStr] or ignoreControls[event:GetId()] then ! event:Skip() return end --- 312,316 ---- -- during shutdown, we nil textCtrl since events are sent and we don't want them anymore if (not textCtrl) or ignoreEVTs[evtTypeStr] or ignoreControls[event:GetId()] then ! event:Skip(skip) return end *************** *** 347,351 **** textCtrl:AppendText(s.."\n\n") ! event:Skip() end --- 348,352 ---- textCtrl:AppendText(s.."\n\n") ! event:Skip(skip) end *************** *** 386,390 **** local function ConnectEvents(control) -- Note this is the same as doing this, but we connect all of them ! -- scrollWin:Connect(wx.wxID_ANY, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnCommandEvent) for i = 1, #wxEVT_Array do --- 387,391 ---- local function ConnectEvents(control) -- Note this is the same as doing this, but we connect all of them ! -- win:Connect(wx.wxID_ANY, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnCommandEvent) for i = 1, #wxEVT_Array do *************** *** 871,877 **** imageList:delete() if taskbarIcon then ! if taskbarIcon:IsIconInstalled() then ! taskbarIcon:RemoveIcon() ! end taskbarIcon:delete() -- must delete() it for program to exit in MSW --- 872,878 ---- imageList:delete() if taskbarIcon then ! --if taskbarIcon:IsIconInstalled() then ! -- taskbarIcon:RemoveIcon() ! --end taskbarIcon:delete() -- must delete() it for program to exit in MSW |