diff --git a/src/editor/debugger.lua b/src/editor/debugger.lua index 1a6ea70adb..41bb5485a6 100644 --- a/src/editor/debugger.lua +++ b/src/editor/debugger.lua @@ -765,7 +765,7 @@ function debuggerCreateStackWindow() return true end) - local notebook = wxaui.wxAuiNotebook(frame, wx.wxID_ANY, + local notebook = wxaui.wxAuiNotebook(ide.frame, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxDefaultSize, wxaui.wxAUI_NB_DEFAULT_STYLE + wxaui.wxAUI_NB_TAB_EXTERNAL_MOVE - wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER) @@ -781,7 +781,7 @@ function debuggerCreateStackWindow() end local function debuggerCreateWatchWindow() - local watchCtrl = wx.wxListCtrl(frame, wx.wxID_ANY, + local watchCtrl = wx.wxListCtrl(ide.frame, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxLC_REPORT + wx.wxLC_EDIT_LABELS) @@ -871,7 +871,7 @@ local function debuggerCreateWatchWindow() event:Skip() end) - local notebook = wxaui.wxAuiNotebook(frame, wx.wxID_ANY, + local notebook = wxaui.wxAuiNotebook(ide.frame, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxDefaultSize, wxaui.wxAUI_NB_DEFAULT_STYLE + wxaui.wxAUI_NB_TAB_EXTERNAL_MOVE - wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER) diff --git a/src/editor/editor.lua b/src/editor/editor.lua index ad680e07d1..8813947d32 100644 --- a/src/editor/editor.lua +++ b/src/editor/editor.lua @@ -667,7 +667,7 @@ function CreateEditor() local keycode = event:GetKeyCode() local mod = event:GetModifiers() local first, last = 0, notebook:GetPageCount()-1 - if keycode == wx.WXK_ESCAPE and frame:IsFullScreen() then + if keycode == wx.WXK_ESCAPE and ide.frame:IsFullScreen() then ShowFullScreen(false) -- Ctrl-Home and Ctrl-End don't work on OSX with 2.9.5+; fix it elseif ide.osname == 'Macintosh' and ide.wxver >= "2.9.5" diff --git a/src/editor/gui.lua b/src/editor/gui.lua index 12e7991da6..8765c63b7c 100644 --- a/src/editor/gui.lua +++ b/src/editor/gui.lua @@ -5,7 +5,7 @@ local ide = ide -- Pick some reasonable fixed width fonts to use for the editor local function setFont(style, config) - return wx.wxFont(config.fontsize or size or 10, wx.wxFONTFAMILY_MODERN, style, + return wx.wxFont(config.fontsize or 10, wx.wxFONTFAMILY_MODERN, style, wx.wxFONTWEIGHT_NORMAL, false, config.fontname or "", config.fontencoding or wx.wxFONTENCODING_DEFAULT) end @@ -33,7 +33,7 @@ end -- Create the wxFrame -- ---------------------------------------------------------------------------- local function createFrame() - frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, GetIDEString("editor"), + local frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, GetIDEString("editor"), wx.wxDefaultPosition, wx.wxSize(1000, 700)) -- wrap into protected call as DragAcceptFiles fails on MacOS with -- wxwidgets 2.8.12 even though it should work according to change notes @@ -180,7 +180,7 @@ local function createNotebook(frame) notebook:Connect(ID_SAVE, wx.wxEVT_COMMAND_MENU_SELECTED, function () local editor = GetEditor(selection) - SaveFile(editor, openDocuments[editor:GetId()].filePath) + SaveFile(editor, ide.openDocuments[editor:GetId()].filePath) end) notebook:Connect(ID_SAVE, wx.wxEVT_UPDATE_UI, IfModified) notebook:Connect(ID_SAVEAS, wx.wxEVT_COMMAND_MENU_SELECTED, function() diff --git a/src/editor/settings.lua b/src/editor/settings.lua index aa03bf74e4..081133b101 100644 --- a/src/editor/settings.lua +++ b/src/editor/settings.lua @@ -253,8 +253,8 @@ local function saveNotebook(nb) return t end - sortedX = sortedPages(pagesX) - sortedY = sortedPages(pagesY) + local sortedX = sortedPages(pagesX) + local sortedY = sortedPages(pagesY) -- for now only support "1D" splits and prefer -- dimension which has more, anything else diff --git a/src/editor/shellbox.lua b/src/editor/shellbox.lua index 96e8424794..6ab8ccbffd 100644 --- a/src/editor/shellbox.lua +++ b/src/editor/shellbox.lua @@ -264,6 +264,7 @@ local function executeShellCode(tx) local addedret, forceexpression = true, tx:match("^%s*=%s*") tx = tx:gsub("^%s*=%s*","") + local fn fn, err = loadstring("return "..tx) if not forceexpression and err and (err:find("'?'? expected near '") or