From: John L. <jr...@us...> - 2006-05-25 04:00:51
|
Update of /cvsroot/wxlua/website In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12883/website Modified Files: luasample.lua luasample.lua.html Log Message: change wxEvtHandler::ConnectEvent to Connect Index: luasample.lua =================================================================== RCS file: /cvsroot/wxlua/website/luasample.lua,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** luasample.lua 22 Feb 2006 21:46:53 -0000 1.1 --- luasample.lua 25 May 2006 04:00:48 -0000 1.2 *************** *** 22,35 **** -- 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.', ! "About wxLua", ! wx.wxOK + wx.wxICON_INFORMATION, ! frame) ! end ) -- finally, show the frame window --- 22,35 ---- -- 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.', ! "About wxLua", ! wx.wxOK + wx.wxICON_INFORMATION, ! frame) ! end ) -- finally, show the frame window Index: luasample.lua.html =================================================================== RCS file: /cvsroot/wxlua/website/luasample.lua.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** luasample.lua.html 22 Feb 2006 21:49:44 -0000 1.1 --- luasample.lua.html 25 May 2006 04:00:48 -0000 1.2 *************** *** 26,39 **** <span style="font-style: italic"><span style="color: #9A1900">-- connect the selection event of the exit menu item to an</span></span> <span style="font-style: italic"><span style="color: #9A1900">-- event handler that closes the window</span></span> ! <span style="font-weight: bold"><span style="color: #000000">frame:ConnectEvent</span></span><span style="color: #990000">(</span>wx<span style="color: #990000">.</span>wxID_EXIT<span style="color: #990000">,</span> wx<span style="color: #990000">.</span>wxEVT_COMMAND_MENU_SELECTED<span style="color: #990000">,</span> ! <span style="font-weight: bold"><span style="color: #0000FF">function</span></span> <span style="color: #990000">(</span>event<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #000000">frame:Close</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">end</span></span> <span style="color: #990000">)</span> <span style="font-style: italic"><span style="color: #9A1900">-- connect the selection event of the about menu item</span></span> ! <span style="font-weight: bold"><span style="color: #000000">frame:ConnectEvent</span></span><span style="color: #990000">(</span>wx<span style="color: #990000">.</span>wxID_ABOUT<span style="color: #990000">,</span> wx<span style="color: #990000">.</span>wxEVT_COMMAND_MENU_SELECTED<span style="color: #990000">,</span> ! <span style="font-weight: bold"><span style="color: #0000FF">function</span></span> <span style="color: #990000">(</span>event<span style="color: #990000">)</span> ! wx<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wxMessageBox</span></span><span style="color: #990000">(</span><span style="color: #FF0000">'This is the "About" dialog of the Minimal wxLua sample.'</span><span style="color: #990000">,</span> ! <span style="color: #FF0000">"About wxLua"</span><span style="color: #990000">,</span> ! wx<span style="color: #990000">.</span>wxOK <span style="color: #990000">+</span> wx<span style="color: #990000">.</span>wxICON_INFORMATION<span style="color: #990000">,</span> ! frame<span style="color: #990000">)</span> ! <span style="font-weight: bold"><span style="color: #0000FF">end</span></span> <span style="color: #990000">)</span> <span style="font-style: italic"><span style="color: #9A1900">-- finally, show the frame window</span></span> --- 26,39 ---- <span style="font-style: italic"><span style="color: #9A1900">-- connect the selection event of the exit menu item to an</span></span> <span style="font-style: italic"><span style="color: #9A1900">-- event handler that closes the window</span></span> ! <span style="font-weight: bold"><span style="color: #000000">frame:Connect</span></span><span style="color: #990000">(</span>wx<span style="color: #990000">.</span>wxID_EXIT<span style="color: #990000">,</span> wx<span style="color: #990000">.</span>wxEVT_COMMAND_MENU_SELECTED<span style="color: #990000">,</span> ! <span style="font-weight: bold"><span style="color: #0000FF">function</span></span> <span style="color: #990000">(</span>event<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #000000">frame:Close</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">end</span></span> <span style="color: #990000">)</span> <span style="font-style: italic"><span style="color: #9A1900">-- connect the selection event of the about menu item</span></span> ! <span style="font-weight: bold"><span style="color: #000000">frame:Connect</span></span><span style="color: #990000">(</span>wx<span style="color: #990000">.</span>wxID_ABOUT<span style="color: #990000">,</span> wx<span style="color: #990000">.</span>wxEVT_COMMAND_MENU_SELECTED<span style="color: #990000">,</span> ! <span style="font-weight: bold"><span style="color: #0000FF">function</span></span> <span style="color: #990000">(</span>event<span style="color: #990000">)</span> ! wx<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wxMessageBox</span></span><span style="color: #990000">(</span><span style="color: #FF0000">'This is the "About" dialog of the Minimal wxLua sample.'</span><span style="color: #990000">,</span> ! <span style="color: #FF0000">"About wxLua"</span><span style="color: #990000">,</span> ! wx<span style="color: #990000">.</span>wxOK <span style="color: #990000">+</span> wx<span style="color: #990000">.</span>wxICON_INFORMATION<span style="color: #990000">,</span> ! frame<span style="color: #990000">)</span> ! <span style="font-weight: bold"><span style="color: #0000FF">end</span></span> <span style="color: #990000">)</span> <span style="font-style: italic"><span style="color: #9A1900">-- finally, show the frame window</span></span> |