New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add compatibility for wxwidgets 2.9.x #89
Comments
wxwidgets 2.9.x in some cases returns the last segment of the path twice (at least on Windows), which makes the entire path invalid.
|
@Toiffel, thanks for the binaries. You should be able to run the current version using wxwidgets 2.9.x. I suggest you rebase with the current HEAD as you won't have any conflicts. Please post here any issues you notice and I'll update the ticket. The changes have only been tested on Windows so far. |
|
My $0.02. These issues may or may not be 2.9.x-specific; I just put them all together.
|
These are not 2.9.x issues. They are reproducible in the current version. Will fix. Recent files need to be re-done as they are inefficiently managed.
This is serious. I'll need to check if the samples are working. Maybe it's just an API change... Linux crash is also serious. I've seen something similar on OSX with 2.9.3 and added this check at the end of CloseWindow function: -- without explicit exit() the IDE crashes with SIGILL exception when closed
-- on MacOS compiled under 64bit with wxwidgets 2.9.3
if ide.osname == "Macintosh" then os.exit() endCan you enable it for Linux and see if this fixes an issue? What's the stack trace from the crash? |
|
Yes, |
|
I checked the samples that come with wxlua and they also don't have folding (on Windows, using 2.9.5). Just in case the version of Scintilla that comes with 2.9.5 is 3.21. The version that comes with 2.9.4 is much older one (2.03). This may be a relevant ticket, although it should be fixed in 2.9.5. The strange thing is that it's not just markers: folding all/some doesn't work either. |
|
You're right, folding had stopped working exactly after 2.9.4 -> 2.9.5 transition. However API doesn't seem to have changed, at least on wxLua side. Maybe newer versions of Scintilla have some additional properties to set? (like BTW I fixed the second issue with crashes on exit both for OS X and Linux. They were caused by missing wxAuiManager::UnInit() which should always be called before a managed frame is destroyed. Please check this commit and cherry-pick it if it works for you. |
|
Good catch on AuiManager::UnInit()! I'll get the commit into the current master branch. The situation with folds is interesting. If you run |
|
Here is a minimal example with folds that works in 2.8.x, but doesn't work in 2.9.5: require "wx"
local frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "STC Demo",
wx.wxDefaultPosition, wx.wxSize(450, 450), wx.wxDEFAULT_FRAME_STYLE )
local e = wxstc.wxStyledTextCtrl(frame, wx.wxID_ANY,
wx.wxDefaultPosition, wx.wxSize(0, 0), wx.wxBORDER_STATIC)
e:SetText("if true then\n print('123')\nend\n\nfoo(1,\n 2)\n")
e:SetMarginType(0, wxstc.wxSTC_MARGIN_SYMBOL)
e:SetMarginWidth(0, 15)
e:SetMarginMask(0, wxstc.wxSTC_MASK_FOLDERS)
e:SetMarginWidth(1, 0)
local w, b = wx.wxColour(255, 255, 255), wx.wxColour(0, 0, 0)
e:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERTAIL, wxstc.wxSTC_MARK_LCORNER, w, b)
e:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERSUB, wxstc.wxSTC_MARK_VLINE, w, b)
e:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPEN, wxstc.wxSTC_MARK_BOXMINUS, w, b)
e:SetProperty("fold", "1")
e:SetLexer(wxstc.wxSTC_LEX_LUA) --<-- this needs to be moved before SetProperty to work
e:SetKeyWords(0, "if then end do")
frame:Show(true)
wx.wxGetApp():MainLoop()Also, I checked SciTE based on the same version of Scintilla (3.2.1) and the folds are working there. So it seems to be something on the wxwidgets side. |
|
Few more pieces of information. The second example on this page doesn't show folds when compiled with 2.9.5, but the sample that comes with wxwidgets ( |
|
Ok, I figured the issue: e:SetLexer(wxstc.wxSTC_LEX_LUA)
e:SetProperty("fold", "1")I guess it didn't matter with earlier versions, but seems to matter now... I'll restructure the code to take that into account. |
|
Well done! I'd never think the order of calls does matter. One small addition to the issue with function list dropdown. On Linux (using wxWidgets 2.9.5) it always shows "Jump to a function definition..." and never gets updated. It seems like neither wxEVT_SET_FOCUS nor wxEVT_LEFT_DOWN is triggered. |
|
@Toiffel, thank you for the heads up on the Linux issue; haven't had a chance to test there yet. I'll push a new 2.9 branch shortly as it includes some incompatible changes that need to be tested. The fold changes and your fix has been included and pushed. |
|
Updated, thanks. Code folding now works properly. BTW, if you need to test 2.9.5 on Linux, you may want to check this commit. I modified |
|
Arthur, I'm working on putting 2.9.5-related changes into a new branch and would like to merge your changes including the binaries. Is mingw a good branch to merge? Do you need to do any cleanup/rebase there? Also, do you plan to put Linux binaries there too? Since we're switching to 2.9.x, it would be useful to include Linux binaries (in the same way we do for OSX/Windows); we just need to make sure that they are built against the oldest libc we want to support. Could be 2.11.1-0 to support Ubuntu 10.4 and up or 2.11.3-4 to support Debian Squeeze and up. It seems like going with 2.11.1-0 would be the safest bet and gives us the most coverage in terms of Linux versions. |
|
Okay, I've prepared mingw branch for merging. Note that zbstudio.exe has been rebuilt from scratch and contains only small 32x32 icon. I suggest you to put a multi-size ZBS icon into As for Linux, I wouldn't provide libwx.so within the source distribution. Instead of this I'd include libwx.so only to deb packages. Users of other distros can always build their own libwx.so via build-linux.sh (or just install an older wxLua/wxWidgets 2.8.12 from repos if you'll keep the backward compability). |
…#89). Removed Cut/Copy/Paste/Undo/Redo icons from the toolbar as these are rarely used and were taking too much space.
|
@Toiffel, thanks for the updates in the I updated the first post in this ticket with the list of current issues; will be working on OSX ones tomorrow. I switched to "native" toolbar on OSX, but it requires 24px icons that I haven't updated yet (I mostly copied 16px icons into 24px ones). Also, live coding doesn't work with wxwidgets apps because of wxlua fix that I apply, which is not included in your binaries. I'll update the build scripts and binaries with the fix in few days. Everything else looks good so far. Please let me know and update the ticket if you find any new issues. Thanks! |
|
Nice progress, Paul:) I've just found an another 2.9.x bug related to rearranging the editor tabs with drag and drop. This seems to break a mapping between the visual order of editor tabs and the array of opened documents. Try to open two documents, swap them by dragging one editor tab onto another and type smth in the active document. The another tab (i.e. inactive one) will be wrongly updated. |
|
I agree; It wouldn't be my preference (and I'm looking at using wxComboBox instead of wxChoice on Linux), but the main reason being is to give a larger audience a chance to test new binaries before the next release. I'll take a stub at fixing the wxChoice issue before the merge... |
|
@Toiffel, take a look; wxChoice issue should be fixed ;). |
|
Hi Arthur, have you noticed any segfaults on Linux when exiting the IDE? You may need to remove |
The builtin library is now using separate symbols to avoid conflicts with system libpng.
|
I added a workaround for the crash and it seems to be completely gone, but I don't like that the workaround is even needed: a26d72f. |
…(ref #89). On Windows multiple COMBOBOX_SELECTED events are sent when Enter is used, which may lead to run-time errors. Disabled processing of multiple copies of the same event.
This is caused by two PAGE_CHANGED event for the notebook triggered when the current tab is not the last one (in wx2.9.5+). This could lead to a crash if the incorrect tab is closed (ref #89).
The issue the workaround was for was already fixed in wxwidgets: http://trac.wxwidgets.org/ticket/14142
Fixed issues
file:/D%3a/users/..., which creates several problems: (1)file:/prefix needs to be removed, (2) %xx need to be decoded, and (3) the path needs to be normalized for native processing (or any separator dependent code needs to be updated); alsoFindFirstandFindNextfunctions now return full path where the relative path was returned (in 2.8.x)wxDirDialogon Windows: when a folder is selected with a double click and up the hierarchy, then the same name is shown in the "folder" text field and is returned as part of the name, such that if you select folder "foo", you get "foo/foo".ZeroBraneStudio.iniis saved inC:\Users\<user>\AppData\Roaming\.GotoPosorSetCurrentPoswithEnsureCaretVisibledon't make the caret visible (Reopened tabs don't center the editor view correctly #116).SetDefaultto makeFindactivated byCmd-FDrawEllipticArcdoesn't draw anything on OSX.Known and not yet fixed issues
build/CMakefileneeds to be updated to work with new linux configurationFloodFilldoesn't fill anything on OSXLinux support
Tested on Ubuntu 10.04, Ubuntu 12.04, ArchLinux, Fedora 18 (32/64bit); seen working on Xubuntu 12.10, Gentoo, and Mint.
The text was updated successfully, but these errors were encountered: