Skip to content
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

STC binding constants removed #4

Closed
ildar opened this issue Oct 3, 2017 · 7 comments
Closed

STC binding constants removed #4

ildar opened this issue Oct 3, 2017 · 7 comments
Assignees

Comments

@ildar
Copy link

ildar commented Oct 3, 2017

I got failure building with the latest GIT wxGTK3.1:
some constants were removed from interface/wx/stc/stc.h, hence the error I experience:

/usr/src/RPM/BUILD/wxlua-2.8.12.3/modules/wxbind/src/wxstc_bind.cpp: In function 'wxLuaBindNumber* wxLuaGetDefineList_wxstc(size_t&)':
/usr/src/RPM/BUILD/wxlua-2.8.12.3/modules/wxbind/src/wxstc_bind.cpp:14808:30: error: 'wxSTC_4GL_BLOCK' was not declared in this scope
{ "wxSTC_4GL_BLOCK", wxSTC_4GL_BLOCK },
/usr/src/RPM/BUILD/wxlua-2.8.12.3/modules/wxbind/src/wxstc_bind.cpp:14809:31: error: 'wxSTC_4GL_BLOCK_' was not declared in this scope
{ "wxSTC_4GL_BLOCK_", wxSTC_4GL_BLOCK_ },
/usr/src/RPM/BUILD/wxlua-2.8.12.3/modules/wxbind/src/wxstc_bind.cpp:14810:34: error: 'wxSTC_4GL_CHARACTER' was not declared in this scope
{ "wxSTC_4GL_CHARACTER", wxSTC_4GL_CHARACTER },

etc etc

@pkulchenko
Copy link
Owner

@ildar, this doesn't seem to be related to wxGTK version, but rather to the version of wxwidgets you are using. What version are you compiling with? What build commands?

@pkulchenko pkulchenko self-assigned this Oct 3, 2017
@ildar
Copy link
Author

ildar commented Oct 3, 2017 via email

@ildar
Copy link
Author

ildar commented Oct 3, 2017 via email

@pkulchenko
Copy link
Owner

@ildar, give it a try; I updated the binding to fix the issues, but only tested on Windows so far. This should work with the current wxwidgets trunk, but may not work with earlier versions (especially those between 3.1.0 and 3.1.1).

Also, some of the constants have been removed, which I fixed in ZeroBrane Studio with the following fragment:

-- wxwidgets 3.1.1+ replaced wxSTC_SCMOD_* with wxSTC_KEYMOD_*; map both for compatibility
for _, key in ipairs({"ALT", "CTRL", "SHIFT", "META", "SUPER", "NORM"}) do
  local scmod = "wxSTC_SCMOD_"..key
  local keymod = "wxSTC_KEYMOD_"..key
  if wxstc[scmod] and not wxstc[keymod] then
    wxstc[keymod] = wxstc[scmod]
  elseif not wxstc[scmod] and wxstc[keymod] then
    wxstc[scmod] = wxstc[keymod]
  end
end

@ildar
Copy link
Author

ildar commented Oct 5, 2017 via email

@pkulchenko
Copy link
Owner

@ildar, did the updates fix the issue for you?

@ildar
Copy link
Author

ildar commented Oct 11, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants