From: John L. <jr...@us...> - 2006-12-10 23:28:16
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23681/wxLua/samples Modified Files: editor.wx.lua Log Message: cleanup, better message output, more error checking Index: editor.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/editor.wx.lua,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** editor.wx.lua 8 Dec 2006 06:16:18 -0000 1.37 --- editor.wx.lua 10 Dec 2006 23:28:12 -0000 1.38 *************** *** 8,11 **** --- 8,36 ---- -------------------------------------------------------------------------=--- + -- Equivalent to C's "cond ? a : b", all terms will be evaluated + function iff(cond, a, b) if cond then return a else return b end end + + -- Does the num has all the bits in value + function HasBit(value, num) + for n = 32, 0, -1 do + local b = 2^n [...1425 lines suppressed...] end else ! local editor = CreateEditor("Untitled") SetupKeywords(editor, true) end --frame:SetIcon(wxLuaEditorIcon) --FIXME add this back --- 2085,2096 ---- notebook:SetSelection(0) else ! local editor = CreateEditor("untitled.lua") SetupKeywords(editor, true) end else ! local editor = CreateEditor("untitled.lua") SetupKeywords(editor, true) end --frame:SetIcon(wxLuaEditorIcon) --FIXME add this back + frame:Show(true) |