From: John L. <jr...@us...> - 2006-05-25 03:55:34
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10746/wxLua/samples Modified Files: calculator.wx.lua choices.wx.lua debug.wx.lua dialog.wx.lua editor.wx.lua fldemo.wx.lua grid.wx.lua htmlwin.wx.lua luamodule.wx.lua mdi.wx.lua minimal.wx.lua printing.wx.lua scribble.wx.lua tree.wx.lua wxluasudoku.wx.lua Log Message: changed wxEvtHandler::ConnectEvent to Connect update all samples to reflect this add win id ranges to connect add untested wxEvtHandler::Disconnect Index: debug.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/debug.wx.lua,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** debug.wx.lua 28 Apr 2006 04:12:43 -0000 1.6 --- debug.wx.lua 25 May 2006 03:55:23 -0000 1.7 *************** *** 115,120 **** end ! frame:ConnectEvent(wx.wxEVT_PAINT, Paint) ! frame:ConnectEvent(wx.wxEVT_ERASE_BACKGROUND, function(event) end) function OnLeftDown(event) --- 115,120 ---- end ! frame:Connect(wx.wxEVT_PAINT, Paint) ! frame:Connect(wx.wxEVT_ERASE_BACKGROUND, function(event) end) function OnLeftDown(event) *************** *** 172,178 **** end ! frame:ConnectEvent(-1, wx.wxEVT_LEFT_DOWN, OnLeftDown ) ! frame:ConnectEvent(-1, wx.wxEVT_LEFT_UP, OnLeftUp ) ! frame:ConnectEvent(-1, wx.wxEVT_MOTION, OnMotion ) function QuerySaveChanges() --- 172,178 ---- end ! frame:Connect(-1, wx.wxEVT_LEFT_DOWN, OnLeftDown ) ! frame:Connect(-1, wx.wxEVT_LEFT_UP, OnLeftUp ) ! frame:Connect(-1, wx.wxEVT_MOTION, OnMotion ) function QuerySaveChanges() *************** *** 307,318 **** frame:SetStatusText("Welcome to wxLua.") ! frame:ConnectEvent(wx.wxID_EXIT, ! wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close(true) end ) ! frame:ConnectEvent(wx.wxID_NEW, ! wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local isOKToContinue = 1 --- 307,316 ---- frame:SetStatusText("Welcome to wxLua.") ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close(true) end ) ! frame:Connect(wx.wxID_NEW, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local isOKToContinue = 1 *************** *** 335,340 **** end ) ! frame:ConnectEvent(wx.wxID_OPEN, ! wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local isOKToContinue = 1 --- 333,337 ---- end ) ! frame:Connect(wx.wxID_OPEN, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local isOKToContinue = 1 *************** *** 355,360 **** end ) ! frame:ConnectEvent(wx.wxID_SAVE, ! wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local isSaved --- 352,356 ---- end ) ! frame:Connect(wx.wxID_SAVE, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local isSaved *************** *** 369,374 **** end ) ! frame:ConnectEvent(wx.wxID_SAVEAS, ! wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local isSaved = SaveAs() --- 365,369 ---- end ) ! frame:Connect(wx.wxID_SAVEAS, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local isSaved = SaveAs() *************** *** 378,383 **** end ) ! frame:ConnectEvent(wx.wxID_ABOUT, ! wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox( 'This is the "About" dialog of the Scribble wxLua Sample.', --- 373,377 ---- end ) ! frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox( 'This is the "About" dialog of the Scribble wxLua Sample.', *************** *** 387,397 **** end ) ! frame:ConnectEvent(wxID_NOPROMPT, ! wx.wxEVT_UPDATE_UI, function ( event ) end) ! frame:ConnectEvent(wxID_NOPROMPT, ! wx.wxEVT_COMMAND_MENU_SELECTED, function (event) if config:ReadInt("/Controls/Check", 1) == 1 then --- 381,389 ---- end ) ! frame:Connect(wxID_NOPROMPT, wx.wxEVT_UPDATE_UI, function ( event ) end) ! frame:Connect(wxID_NOPROMPT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) if config:ReadInt("/Controls/Check", 1) == 1 then *************** *** 402,406 **** end ) ! frame:ConnectEvent(wx.wxEVT_CLOSE_WINDOW, function (event) local isOkToClose = 1 --- 394,398 ---- end ) ! frame:Connect(wx.wxEVT_CLOSE_WINDOW, function (event) local isOkToClose = 1 *************** *** 441,446 **** end ) ! frame:ConnectEvent(wxID_DEBUG, ! wx.wxEVT_COMMAND_MENU_SELECTED, function (event) causeError() --- 433,437 ---- end ) ! frame:Connect(wxID_DEBUG, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) causeError() Index: mdi.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/mdi.wx.lua,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mdi.wx.lua 28 Apr 2006 04:12:43 -0000 1.8 --- mdi.wx.lua 25 May 2006 03:55:23 -0000 1.9 *************** *** 30,34 **** dc:Delete() -- ALWAYS Delete() any wxDCs created when done end ! child:ConnectEvent(wx.wxEVT_PAINT, Paint) child:Show(true) end --- 30,34 ---- dc:Delete() -- ALWAYS Delete() any wxDCs created when done end ! child:Connect(wx.wxEVT_PAINT, Paint) child:Show(true) end *************** *** 57,67 **** frame:SetStatusText("Welcome to wxLua.") ! frame:ConnectEvent(wx.wxID_NEW, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) CreateChild() end ) ! frame:ConnectEvent(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) frame:Close() end ) ! frame:ConnectEvent(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('This is the "About" dialog of the MDI wxLua sample.', --- 57,67 ---- frame:SetStatusText("Welcome to wxLua.") ! frame:Connect(wx.wxID_NEW, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) CreateChild() end ) ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) frame:Close() end ) ! frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('This is the "About" dialog of the MDI wxLua sample.', Index: fldemo.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/fldemo.wx.lua,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fldemo.wx.lua 25 Feb 2006 23:29:58 -0000 1.3 --- fldemo.wx.lua 25 May 2006 03:55:23 -0000 1.4 *************** *** 112,122 **** frame:SetStatusText("Welcome to wxLua.") ! frame:ConnectEvent(wx.wxID_EXIT, ! wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close(true) end ) ! frame:ConnectEvent( wx.wxEVT_CLOSE_WINDOW, function ( event ) event:Skip() --- 112,121 ---- frame:SetStatusText("Welcome to wxLua.") ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close(true) end ) ! frame:Connect( wx.wxEVT_CLOSE_WINDOW, function ( event ) event:Skip() *************** *** 125,130 **** end) ! frame:ConnectEvent(wx.wxID_ABOUT, ! wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox( 'This is the "About" dialog of the FL Demo wxLua sample.', --- 124,128 ---- end) ! frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox( 'This is the "About" dialog of the FL Demo wxLua sample.', Index: choices.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/choices.wx.lua,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** choices.wx.lua 28 Apr 2006 04:12:43 -0000 1.7 --- choices.wx.lua 25 May 2006 03:55:23 -0000 1.8 *************** *** 83,94 **** notebook:GetBestSize():GetHeight()) ! frame:ConnectEvent(wx.wxID_ANY, wx.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, HandleEvents) ! frame:ConnectEvent(wx.wxID_ANY, wx.wxEVT_COMMAND_RADIOBOX_SELECTED, HandleEvents) ! frame:ConnectEvent(wx.wxID_ANY, wx.wxEVT_COMMAND_LISTBOX_SELECTED, HandleEvents) ! frame:ConnectEvent(wx.wxID_ANY, wx.wxEVT_COMMAND_COMBOBOX_SELECTED, HandleEvents) ! frame:ConnectEvent(wx.wxID_ANY, wx.wxEVT_COMMAND_CHOICE_SELECTED, HandleEvents) ! frame:ConnectEvent(wx.wxID_ANY, wx.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, HandleEvents) frame:Show(true) --- 83,94 ---- notebook:GetBestSize():GetHeight()) ! frame:Connect(wx.wxID_ANY, wx.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, HandleEvents) ! frame:Connect(wx.wxID_ANY, wx.wxEVT_COMMAND_RADIOBOX_SELECTED, HandleEvents) ! frame:Connect(wx.wxID_ANY, wx.wxEVT_COMMAND_LISTBOX_SELECTED, HandleEvents) ! frame:Connect(wx.wxID_ANY, wx.wxEVT_COMMAND_COMBOBOX_SELECTED, HandleEvents) ! frame:Connect(wx.wxID_ANY, wx.wxEVT_COMMAND_CHOICE_SELECTED, HandleEvents) ! frame:Connect(wx.wxID_ANY, wx.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, HandleEvents) frame:Show(true) Index: minimal.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/minimal.wx.lua,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** minimal.wx.lua 28 Apr 2006 04:12:43 -0000 1.5 --- minimal.wx.lua 25 May 2006 03:55:23 -0000 1.6 *************** *** 43,47 **** -- connect the paint event handler function with the paint event ! panel:ConnectEvent(wx.wxEVT_PAINT, OnPaint) -- create a simple file menu --- 43,47 ---- -- connect the paint event handler function with the paint event ! panel:Connect(wx.wxEVT_PAINT, OnPaint) -- create a simple file menu *************** *** 67,75 **** -- connect the selection event of the exit menu item to an -- event handler that closes the window ! frame:ConnectEvent(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) frame:Close(true) end ) -- connect the selection event of the about menu item ! frame:ConnectEvent(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('This is the "About" dialog of the Minimal wxLua sample.', --- 67,75 ---- -- connect the selection event of the exit menu item to an -- event handler that closes the window ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) frame:Close(true) end ) -- connect the selection event of the about menu item ! frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('This is the "About" dialog of the Minimal wxLua sample.', Index: wxluasudoku.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/wxluasudoku.wx.lua,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** wxluasudoku.wx.lua 14 May 2006 07:48:09 -0000 1.46 --- wxluasudoku.wx.lua 25 May 2006 03:55:23 -0000 1.47 *************** *** 2011,2020 **** end ! win:ConnectEvent(wx.wxEVT_ERASE_BACKGROUND, function(event) end) ! win:ConnectEvent(wx.wxEVT_PAINT, sudokuGUI.OnPaintCellWindow) ! win:ConnectEvent(wx.wxEVT_KEY_DOWN, sudokuGUI.OnKeyDownCellWindow ) ! win:ConnectEvent(wx.wxEVT_KEY_UP, sudokuGUI.OnKeyUpCellWindow ) ! win:ConnectEvent(wx.wxEVT_LEFT_DOWN, sudokuGUI.OnLeftClickCellWindow ) ! win:ConnectEvent(wx.wxEVT_LEFT_DCLICK, sudokuGUI.OnLeftDClickCellWindow ) return win end --- 2011,2020 ---- end ! win:Connect(wx.wxEVT_ERASE_BACKGROUND, function(event) end) ! win:Connect(wx.wxEVT_PAINT, sudokuGUI.OnPaintCellWindow) ! win:Connect(wx.wxEVT_KEY_DOWN, sudokuGUI.OnKeyDownCellWindow ) ! win:Connect(wx.wxEVT_KEY_UP, sudokuGUI.OnKeyUpCellWindow ) ! win:Connect(wx.wxEVT_LEFT_DOWN, sudokuGUI.OnLeftClickCellWindow ) ! win:Connect(wx.wxEVT_LEFT_DCLICK, sudokuGUI.OnLeftDClickCellWindow ) return win end *************** *** 2375,2383 **** wx.wxDefaultPosition, wx.wxSize(600, 600)) ! previewFrame:ConnectEvent(wx.wxEVT_CLOSE_WINDOW, ! function (event) ! previewFrame:Destroy() ! event:Skip() ! end ) previewFrame:Centre(wx.wxBOTH) --- 2375,2383 ---- wx.wxDefaultPosition, wx.wxSize(600, 600)) ! previewFrame:Connect(wx.wxEVT_CLOSE_WINDOW, ! function (event) ! previewFrame:Destroy() ! event:Skip() ! end ) previewFrame:Centre(wx.wxBOTH) *************** *** 2610,2628 **** --cellTextCtrl:SetValidator(valid) ! sudokuGUI.cellTextCtrl:ConnectEvent(winId, wx.wxEVT_COMMAND_TEXT_ENTER, ! function (event) ! local win = event:GetEventObject():DynamicCast("wxWindow") ! sudokuGUI.SaveCellTextCtrlValue() ! win:Show(false) -- just hide it, we'll destroy it later ! end) ! sudokuGUI.cellTextCtrl:ConnectEvent(wx.wxEVT_CHAR, ! function (event) ! if (event:GetKeyCode() == wx.WXK_ESCAPE) then ! sudokuGUI.cellTextCtrl:Show(false) ! sudokuGUI.cellTextCtrl:SetValue("") ! end ! event:Skip() ! end) end --- 2610,2628 ---- --cellTextCtrl:SetValidator(valid) ! sudokuGUI.cellTextCtrl:Connect(winId, wx.wxEVT_COMMAND_TEXT_ENTER, ! function (event) ! local win = event:GetEventObject():DynamicCast("wxWindow") ! sudokuGUI.SaveCellTextCtrlValue() ! win:Show(false) -- just hide it, we'll destroy it later ! end) ! sudokuGUI.cellTextCtrl:Connect(wx.wxEVT_CHAR, ! function (event) ! if (event:GetKeyCode() == wx.WXK_ESCAPE) then ! sudokuGUI.cellTextCtrl:Show(false) ! sudokuGUI.cellTextCtrl:SetValue("") ! end ! event:Skip() ! end) end *************** *** 3315,3319 **** panel:SetSizer( mainSizer ) ! sampleWin:ConnectEvent(wx.wxEVT_PAINT, function (event) local win = event:GetEventObject():DynamicCast("wxWindow") --- 3315,3319 ---- panel:SetSizer( mainSizer ) ! sampleWin:Connect(wx.wxEVT_PAINT, function (event) local win = event:GetEventObject():DynamicCast("wxWindow") *************** *** 3417,3421 **** end) ! panel:ConnectEvent(ID_LISTBOX, wx.wxEVT_COMMAND_LISTBOX_SELECTED, function (event) local sel = event:GetSelection() + 1 --- 3417,3421 ---- end) ! panel:Connect(ID_LISTBOX, wx.wxEVT_COMMAND_LISTBOX_SELECTED, function (event) local sel = event:GetSelection() + 1 *************** *** 3425,3429 **** end) ! panel:ConnectEvent(ID_FONT_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = fcListBox:GetSelection() + 1 --- 3425,3429 ---- end) ! panel:Connect(ID_FONT_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = fcListBox:GetSelection() + 1 *************** *** 3439,3443 **** sampleWin:Refresh(false) end) ! panel:ConnectEvent(ID_COLOUR_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = fcListBox:GetSelection() + 1 --- 3439,3443 ---- sampleWin:Refresh(false) end) ! panel:Connect(ID_COLOUR_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = fcListBox:GetSelection() + 1 *************** *** 3453,3457 **** sampleWin:Refresh(false) end) ! panel:ConnectEvent(ID_RESET_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = fcListBox:GetSelection() + 1 --- 3453,3457 ---- sampleWin:Refresh(false) end) ! panel:Connect(ID_RESET_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = fcListBox:GetSelection() + 1 *************** *** 3580,3584 **** end ! panel:ConnectEvent(ID_LISTBOX, wx.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, function (event) local sel = event:GetSelection() --- 3580,3584 ---- end ! panel:Connect(ID_LISTBOX, wx.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, function (event) local sel = event:GetSelection() *************** *** 3662,3666 **** end ! panel:ConnectEvent(ID_LISTBOX, wx.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, function (event) local sel = event:GetSelection() --- 3662,3666 ---- end ! panel:Connect(ID_LISTBOX, wx.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, function (event) local sel = event:GetSelection() *************** *** 3727,3736 **** mainSizer:SetSizeHints( dialog ) ! dialog:ConnectEvent(wx.wxID_APPLY, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = notebook:GetSelection() if sel >= 0 then notebookPages[sel+1].Apply() end end) ! dialog:ConnectEvent(wx.wxID_OK, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) for n = 1, 3 do --- 3727,3736 ---- mainSizer:SetSizeHints( dialog ) ! dialog:Connect(wx.wxID_APPLY, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = notebook:GetSelection() if sel >= 0 then notebookPages[sel+1].Apply() end end) ! dialog:Connect(wx.wxID_OK, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) for n = 1, 3 do *************** *** 3741,3745 **** event:Skip() -- wxDialog will cancel automatically end) ! dialog:ConnectEvent(wx.wxID_CANCEL, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) for n = 1, 3 do --- 3741,3745 ---- event:Skip() -- wxDialog will cancel automatically end) ! dialog:Connect(wx.wxID_CANCEL, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) for n = 1, 3 do *************** *** 4407,4412 **** -- ------------------------------------------------------------------------ ! sudokuGUI.frame:ConnectEvent(wx.wxID_ANY, wx.wxEVT_COMMAND_MENU_SELECTED, ! sudokuGUI.OnMenuEvent) -- ------------------------------------------------------------------------ --- 4407,4412 ---- -- ------------------------------------------------------------------------ ! sudokuGUI.frame:Connect(wx.wxID_ANY, wx.wxEVT_COMMAND_MENU_SELECTED, ! sudokuGUI.OnMenuEvent) -- ------------------------------------------------------------------------ *************** *** 4470,4474 **** -- After being created - connect the size event to help MSW repaint the -- child windows ! sudokuGUI.frame:ConnectEvent(wx.wxEVT_SIZE, function (event) local width, height = sudokuGUI.frame:GetClientSize() --- 4470,4474 ---- -- After being created - connect the size event to help MSW repaint the -- child windows ! sudokuGUI.frame:Connect(wx.wxEVT_SIZE, function (event) local width, height = sudokuGUI.frame:GetClientSize() *************** *** 4480,4484 **** -- save the config when closing the frame ! sudokuGUI.frame:ConnectEvent(wx.wxEVT_CLOSE_WINDOW, function (event) event:Skip(true) -- allow it to really exit --- 4480,4484 ---- -- save the config when closing the frame ! sudokuGUI.frame:Connect(wx.wxEVT_CLOSE_WINDOW, function (event) event:Skip(true) -- allow it to really exit Index: tree.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/tree.wx.lua,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tree.wx.lua 28 Apr 2006 04:12:43 -0000 1.5 --- tree.wx.lua 25 May 2006 03:55:23 -0000 1.6 *************** *** 37,41 **** -- connect the selection event of the exit menu item to an -- event handler that closes the window ! frame:ConnectEvent(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close(true) --- 37,41 ---- -- connect the selection event of the exit menu item to an -- event handler that closes the window ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close(true) *************** *** 43,47 **** -- connect the selection event of the about menu item ! frame:ConnectEvent(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('This is the "About" dialog of the wxLua wxTreeCtrl sample.', --- 43,47 ---- -- connect the selection event of the about menu item ! frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('This is the "About" dialog of the wxLua wxTreeCtrl sample.', *************** *** 89,93 **** -- connect to some events from the wxTreeCtrl ! tree:ConnectEvent( wx.wxEVT_COMMAND_TREE_ITEM_EXPANDING, function( event ) local item_id = event:GetItem() --- 89,93 ---- -- connect to some events from the wxTreeCtrl ! tree:Connect( wx.wxEVT_COMMAND_TREE_ITEM_EXPANDING, function( event ) local item_id = event:GetItem() *************** *** 95,99 **** textCtrl:AppendText(str) end ) ! tree:ConnectEvent( wx.wxEVT_COMMAND_TREE_ITEM_COLLAPSING, function( event ) local item_id = event:GetItem() --- 95,99 ---- textCtrl:AppendText(str) end ) ! tree:Connect( wx.wxEVT_COMMAND_TREE_ITEM_COLLAPSING, function( event ) local item_id = event:GetItem() *************** *** 101,105 **** textCtrl:AppendText(str) end ) ! tree:ConnectEvent( wx.wxEVT_COMMAND_TREE_ITEM_ACTIVATED, function( event ) local item_id = event:GetItem() --- 101,105 ---- textCtrl:AppendText(str) end ) ! tree:Connect( wx.wxEVT_COMMAND_TREE_ITEM_ACTIVATED, function( event ) local item_id = event:GetItem() *************** *** 107,111 **** textCtrl:AppendText(str) end ) ! tree:ConnectEvent( wx.wxEVT_COMMAND_TREE_SEL_CHANGED, function( event ) local item_id = event:GetItem() --- 107,111 ---- textCtrl:AppendText(str) end ) ! tree:Connect( wx.wxEVT_COMMAND_TREE_SEL_CHANGED, function( event ) local item_id = event:GetItem() Index: htmlwin.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/htmlwin.wx.lua,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** htmlwin.wx.lua 28 Apr 2006 04:12:43 -0000 1.8 --- htmlwin.wx.lua 25 May 2006 03:55:23 -0000 1.9 *************** *** 63,67 **** frame:SetStatusText("Welcome to wxLua.") ! frame:ConnectEvent(wx.wxID_PREVIEW, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local printing = wx.wxHtmlEasyPrinting("HtmlWindow.wx.lua", frame) --- 63,67 ---- frame:SetStatusText("Welcome to wxLua.") ! frame:Connect(wx.wxID_PREVIEW, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local printing = wx.wxHtmlEasyPrinting("HtmlWindow.wx.lua", frame) *************** *** 69,73 **** end ) ! frame:ConnectEvent(wx.wxID_PRINT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local printing = wx.wxHtmlEasyPrinting("HtmlWindow.wx.lua", frame) --- 69,73 ---- end ) ! frame:Connect(wx.wxID_PRINT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local printing = wx.wxHtmlEasyPrinting("HtmlWindow.wx.lua", frame) *************** *** 77,81 **** -- connect the selection event of the exit menu item to an -- event handler that closes the window ! frame:ConnectEvent(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close(true) --- 77,81 ---- -- connect the selection event of the exit menu item to an -- event handler that closes the window ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close(true) *************** *** 83,87 **** -- connect the selection event of the about menu item ! frame:ConnectEvent(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('This is the "About" dialog of the wxHtmlWindow wxLua sample.', --- 83,87 ---- -- connect the selection event of the about menu item ! frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('This is the "About" dialog of the wxHtmlWindow wxLua sample.', *************** *** 100,104 **** -- when a lua custom tag is parsed in the html, this event handler -- will be invoked ! wx.wxGetApp():ConnectEvent(wx.wxID_ANY, wx.wxEVT_HTML_TAG_HANDLER, function (event) CreateBoundWindow(event) end) --- 100,104 ---- -- when a lua custom tag is parsed in the html, this event handler -- will be invoked ! wx.wxGetApp():Connect(wx.wxID_ANY, wx.wxEVT_HTML_TAG_HANDLER, function (event) CreateBoundWindow(event) end) Index: dialog.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/dialog.wx.lua,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dialog.wx.lua 28 Apr 2006 04:12:43 -0000 1.5 --- dialog.wx.lua 25 May 2006 03:55:23 -0000 1.6 *************** *** 59,63 **** -- Attach an event handler to the CelsiusToFahrenheit button ! dialog:ConnectEvent(ID_CELSIUS_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) local celsiusString = celsiusTextCtrl:GetValue() --- 59,63 ---- -- Attach an event handler to the CelsiusToFahrenheit button ! dialog:Connect(ID_CELSIUS_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) local celsiusString = celsiusTextCtrl:GetValue() *************** *** 74,78 **** -- Attach an event handler to the FahrenheitToCelsius button ! dialog:ConnectEvent(ID_FAHRENHEIT_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) local fahrenheitString = fahrenheitTextCtrl:GetValue() --- 74,78 ---- -- Attach an event handler to the FahrenheitToCelsius button ! dialog:Connect(ID_FAHRENHEIT_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) local fahrenheitString = fahrenheitTextCtrl:GetValue() *************** *** 89,96 **** -- Attach an event handler to the Close button ! dialog:ConnectEvent(ID_CLOSE_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) dialog:Destroy() end) ! dialog:ConnectEvent(wx.wxEVT_CLOSE_WINDOW, function (event) dialog:Destroy() --- 89,96 ---- -- Attach an event handler to the Close button ! dialog:Connect(ID_CLOSE_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) dialog:Destroy() end) ! dialog:Connect(wx.wxEVT_CLOSE_WINDOW, function (event) dialog:Destroy() *************** *** 99,103 **** -- Attach an event handler to the About button ! dialog:ConnectEvent(ID_ABOUT_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) wx.wxMessageBox("Based on the C++ version by Marco Ghislanzoni", --- 99,103 ---- -- Attach an event handler to the About button ! dialog:Connect(ID_ABOUT_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) wx.wxMessageBox("Based on the C++ version by Marco Ghislanzoni", Index: editor.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/editor.wx.lua,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** editor.wx.lua 15 May 2006 21:55:36 -0000 1.17 --- editor.wx.lua 25 May 2006 03:55:23 -0000 1.18 *************** *** 148,152 **** wx.wxCLIP_CHILDREN) ! notebook:ConnectEvent(wx.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, function ( event ) local selection = event:GetSelection() --- 148,152 ---- wx.wxCLIP_CHILDREN) ! notebook:Connect(wx.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, function ( event ) [...1117 lines suppressed...] if watchListCtrl then --- 1869,1873 ---- end) ! editorApp:Connect(-1, wx.wxEVT_WXLUA_DEBUG_EVALUATE_EXPR, function (event) if watchListCtrl then *************** *** 1951,1955 **** menuBar:Append(helpMenu, "&Help") ! frame:ConnectEvent(ID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, displayAbout) frame:SetStatusWidths{-1, 29, 29, 150} --- 1951,1955 ---- menuBar:Append(helpMenu, "&Help") ! frame:Connect(ID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, displayAbout) frame:SetStatusWidths{-1, 29, 29, 150} Index: grid.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/grid.wx.lua,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** grid.wx.lua 27 Apr 2006 22:53:36 -0000 1.5 --- grid.wx.lua 25 May 2006 03:55:23 -0000 1.6 *************** *** 28,37 **** frame:SetStatusText("Welcome to wxLua.") ! frame:ConnectEvent(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close() end ) ! frame:ConnectEvent(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('This is the "About" dialog of the Grid wxLua sample.', --- 28,37 ---- frame:SetStatusText("Welcome to wxLua.") ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close() end ) ! frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('This is the "About" dialog of the Grid wxLua sample.', Index: printing.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/printing.wx.lua,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** printing.wx.lua 28 Apr 2006 04:12:43 -0000 1.9 --- printing.wx.lua 25 May 2006 03:55:23 -0000 1.10 *************** *** 177,185 **** wx.wxSize(600, 650)) ! previewFrame:ConnectEvent(wx.wxEVT_CLOSE_WINDOW, ! function (event) ! previewFrame:Destroy() ! event:Skip() ! end ) previewFrame:Centre(wx.wxBOTH) --- 177,185 ---- wx.wxSize(600, 650)) ! previewFrame:Connect(wx.wxEVT_CLOSE_WINDOW, ! function (event) ! previewFrame:Destroy() ! event:Skip() ! end ) previewFrame:Centre(wx.wxBOTH) *************** *** 230,234 **** -- connect the paint event handler with the paint event ! frame:ConnectEvent(wx.wxEVT_PAINT, Paint) -- create a simple file menu --- 230,234 ---- -- connect the paint event handler with the paint event ! frame:Connect(wx.wxEVT_PAINT, Paint) -- create a simple file menu *************** *** 256,296 **** frame:SetStatusText("Welcome to wxLua.") ! frame:ConnectEvent(ID_PAGESETUP, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! PageSetup() ! end ) ! ! frame:ConnectEvent(ID_PRINTSETUP, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! PrintSetup() ! end ) ! frame:ConnectEvent(ID_PRINTPREVIEW, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! PrintPreview() ! end ) ! frame:ConnectEvent(ID_PRINT, ! wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! Print() ! end ) -- connect the selection event of the exit menu item to an -- event handler that closes the window ! frame:ConnectEvent(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! frame:Close(true) ! end ) -- connect the selection event of the about menu item ! frame:ConnectEvent(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! wx.wxMessageBox( 'This is the "About" dialog of the Printing wxLua sample.', ! "About wxLua", ! wx.wxOK + wx.wxICON_INFORMATION, ! frame ) ! end ) -- show the frame window --- 256,284 ---- frame:SetStatusText("Welcome to wxLua.") ! frame:Connect(ID_PAGESETUP, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) PageSetup() end ) ! frame:Connect(ID_PRINTSETUP, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) PrintSetup() end ) + frame:Connect(ID_PRINTPREVIEW, wx.wxEVT_COMMAND_MENU_SELECTED, + function (event) PrintPreview() end ) ! frame:Connect(ID_PRINT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) Print() end ) -- connect the selection event of the exit menu item to an -- event handler that closes the window ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) frame:Close(true) end ) -- connect the selection event of the about menu item ! frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! wx.wxMessageBox('This is the "About" dialog of the Printing wxLua sample.', ! "About wxLua", ! wx.wxOK + wx.wxICON_INFORMATION, ! frame ) ! end ) -- show the frame window Index: scribble.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/scribble.wx.lua,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** scribble.wx.lua 28 Apr 2006 04:12:43 -0000 1.8 --- scribble.wx.lua 25 May 2006 03:55:23 -0000 1.9 *************** *** 220,230 **** wx.wxDEFAULT_FRAME_STYLE ) ! frame:ConnectEvent(wx.wxEVT_PAINT, OnPaint) ! frame:ConnectEvent(wx.wxEVT_ERASE_BACKGROUND, function(event) end) ! frame:ConnectEvent(-1, wx.wxEVT_LEFT_DOWN, OnLeftDown ) ! frame:ConnectEvent(-1, wx.wxEVT_LEFT_UP, OnLeftUp ) ! frame:ConnectEvent(-1, wx.wxEVT_MOTION, OnMotion ) local fileMenu = wx.wxMenu() --- 220,230 ---- wx.wxDEFAULT_FRAME_STYLE ) ! frame:Connect(wx.wxEVT_PAINT, OnPaint) ! frame:Connect(wx.wxEVT_ERASE_BACKGROUND, function(event) end) ! frame:Connect(-1, wx.wxEVT_LEFT_DOWN, OnLeftDown ) ! frame:Connect(-1, wx.wxEVT_LEFT_UP, OnLeftUp ) ! frame:Connect(-1, wx.wxEVT_MOTION, OnMotion ) local fileMenu = wx.wxMenu() *************** *** 248,349 **** frame:SetStatusText("Welcome to wxLua.") ! frame:ConnectEvent(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! frame:Close(true) ! end ) ! frame:ConnectEvent(wx.wxID_NEW, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! local isOKToContinue = 1 ! if isModified then ! local response = QuerySaveChanges() ! if response == wx.wxID_YES then ! isOKToContinue = SaveChanges() ! elseif response == wx.wxID_CANCEL then ! isOKToContinue = nil ! end ! end ! if isOKToContinue then ! fileName = "" ! frame:SetTitle( "Scribble Demo") ! pointsList = {} ! redrawRequired = true ! frame:Refresh() ! isModified = false ! end ! end ) ! frame:ConnectEvent(wx.wxID_OPEN, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! local isOKToContinue = 1 ! if isModified then ! local response = QuerySaveChanges() ! if response == wx.wxID_YES then ! isOKToContinue = SaveChanges() ! elseif response == wx.wxID_CANCEL then ! isOKToContinue = nil ! end ! end ! if isOKToContinue then ! Open() ! redrawRequired = true ! frame:Refresh() ! isModified = false ! end ! end ) ! frame:ConnectEvent(wx.wxID_SAVE, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! local isSaved ! if fileName == "" then ! isSaved = SaveAs() ! else ! isSaved = SaveScribbles() ! end ! if isSaved then ! isModified = false ! end ! end ) ! frame:ConnectEvent(wx.wxID_SAVEAS, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! local isSaved = SaveAs() ! if isSaved then ! isModified = false ! end ! end ) ! frame:ConnectEvent(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! wx.wxMessageBox( 'This is the "About" dialog of the Scribble wxLua Sample.', ! "About wxLua", ! wx.wxOK + wx.wxICON_INFORMATION, ! frame ) ! end ) ! frame:ConnectEvent(wx.wxEVT_CLOSE_WINDOW, ! function (event) ! local isOkToClose = 1 ! if isModified then ! local dialog = wx.wxMessageDialog( frame, ! "Save changes before exiting?", ! "Save Changes?", ! wx.wxYES_NO + wx.wxCENTRE + wx.wxICON_QUESTION ) ! local result = dialog:ShowModal() ! dialog:Destroy() ! if result == wx.wxID_YES then ! isOkToClose = SaveChanges() ! end ! end ! if isOkToClose then ! -- prevent paint events using the bitmapDC after we ! -- have deleted them ! isRunning = false ! bitmap:Delete() ! -- ensure the event is passed on so ! -- that it is handled ! event:Skip() ! end ! end ) frame:Show(true) --- 248,349 ---- frame:SetStatusText("Welcome to wxLua.") ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! frame:Close(true) ! end ) ! frame:Connect(wx.wxID_NEW, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! local isOKToContinue = 1 ! if isModified then ! local response = QuerySaveChanges() ! if response == wx.wxID_YES then ! isOKToContinue = SaveChanges() ! elseif response == wx.wxID_CANCEL then ! isOKToContinue = nil ! end ! end ! if isOKToContinue then ! fileName = "" ! frame:SetTitle( "Scribble Demo") ! pointsList = {} ! redrawRequired = true ! frame:Refresh() ! isModified = false ! end ! end ) ! frame:Connect(wx.wxID_OPEN, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! local isOKToContinue = 1 ! if isModified then ! local response = QuerySaveChanges() ! if response == wx.wxID_YES then ! isOKToContinue = SaveChanges() ! elseif response == wx.wxID_CANCEL then ! isOKToContinue = nil ! end ! end ! if isOKToContinue then ! Open() ! redrawRequired = true ! frame:Refresh() ! isModified = false ! end ! end ) ! frame:Connect(wx.wxID_SAVE, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! local isSaved ! if fileName == "" then ! isSaved = SaveAs() ! else ! isSaved = SaveScribbles() ! end ! if isSaved then ! isModified = false ! end ! end ) ! frame:Connect(wx.wxID_SAVEAS, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! local isSaved = SaveAs() ! if isSaved then ! isModified = false ! end ! end ) ! frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! wx.wxMessageBox('This is the "About" dialog of the Scribble wxLua Sample.', ! "About wxLua", ! wx.wxOK + wx.wxICON_INFORMATION, ! frame ) ! end ) ! frame:Connect(wx.wxEVT_CLOSE_WINDOW, ! function (event) ! local isOkToClose = 1 ! if isModified then ! local dialog = wx.wxMessageDialog( frame, ! "Save changes before exiting?", ! "Save Changes?", ! wx.wxYES_NO + wx.wxCENTRE + wx.wxICON_QUESTION ) ! local result = dialog:ShowModal() ! dialog:Destroy() ! if result == wx.wxID_YES then ! isOkToClose = SaveChanges() ! end ! end ! if isOkToClose then ! -- prevent paint events using the bitmapDC after we ! -- have deleted them ! isRunning = false ! bitmap:Delete() ! -- ensure the event is passed on so ! -- that it is handled ! event:Skip() ! end ! end ) frame:Show(true) Index: luamodule.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/luamodule.wx.lua,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** luamodule.wx.lua 20 May 2006 20:22:24 -0000 1.2 --- luamodule.wx.lua 25 May 2006 03:55:23 -0000 1.3 *************** *** 11,15 **** -- to make this sample script work out-of-the-box, we need to add ! -- to the paths looked by require() all possible locations of the -- wx.dll/.so module. -- Please also note that this sample can be executed only when --- 11,15 ---- -- to make this sample script work out-of-the-box, we need to add ! -- to the paths looked by require() all possible locations of the -- wx.dll/.so module. -- Please also note that this sample can be executed only when *************** *** 31,36 **** menuBar:Append(fileMenu, "&File") frame:SetMenuBar(menuBar) ! frame:ConnectEvent(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) frame:Close(true) end ) frame:Show(true) --- 31,36 ---- menuBar:Append(fileMenu, "&File") frame:SetMenuBar(menuBar) ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) frame:Close(true) end ) frame:Show(true) Index: calculator.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/calculator.wx.lua,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** calculator.wx.lua 28 Apr 2006 04:12:43 -0000 1.4 --- calculator.wx.lua 25 May 2006 03:55:23 -0000 1.5 *************** *** 259,282 **** clearDisplay = nil ! dialog:ConnectEvent(ID_0, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_1, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_2, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_3, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_4, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_5, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_6, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_7, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_8, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_9, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_DECIMAL, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:ConnectEvent(ID_EQUALS, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnOperator) ! dialog:ConnectEvent(ID_PLUS, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnOperator) ! dialog:ConnectEvent(ID_MINUS, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnOperator) ! dialog:ConnectEvent(ID_MULTIPLY, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnOperator) ! dialog:ConnectEvent(ID_DIVIDE, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnOperator) ! dialog:ConnectEvent(ID_OFF, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnQuit) ! dialog:ConnectEvent(ID_CLEAR, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnClear) ! dialog:ConnectEvent(wx.wxEVT_CLOSE_WINDOW, OnQuit) accelTable = wx.wxAcceleratorTable({ --- 259,282 ---- clearDisplay = nil ! dialog:Connect(ID_0, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_1, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_2, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_3, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_4, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_5, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_6, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_7, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_8, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_9, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_DECIMAL, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnNumber) ! dialog:Connect(ID_EQUALS, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnOperator) ! dialog:Connect(ID_PLUS, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnOperator) ! dialog:Connect(ID_MINUS, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnOperator) ! dialog:Connect(ID_MULTIPLY, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnOperator) ! dialog:Connect(ID_DIVIDE, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnOperator) ! dialog:Connect(ID_OFF, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnQuit) ! dialog:Connect(ID_CLEAR, wx.wxEVT_COMMAND_BUTTON_CLICKED, OnClear) ! dialog:Connect(wx.wxEVT_CLOSE_WINDOW, OnQuit) accelTable = wx.wxAcceleratorTable({ |