[Mac] wxTextCtrl not closing dialog on Enter
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: [Mac] wxTextCtrl not closing dialog on Enter
Hmm, these last three years I always directly compiled in the lowest OS X version I target (ie. 10.8 and or 10.9 depending on the specific app) to get rid of these SDK headaches... But before this saving decision I always downloaded, then installed the right SDK beside the other ones.
Honestly, I don't know if the last SDK(s) are cumulative(s) (ie. contain previous ones with differenciation at compile time depending on passed definition as you suggest) or not. I target Mac because a non-negligible (20 to 25%) part of my apps's users are on Mac, but I'm not a Mac user myself and, by the way, I don't know the recommended practice from Apple (I even don't use XCode and switched from FSF GCC to LLVM Clang very recently only:)...
However, I think we're agree: "--with-macosx-version-min" induces you have to point the concerned SDK by a way (internal definition if it exists -- to be verified) or another (pointing it explicitely on disk using "--with-macosx-sdk").
--
EDIT: Also (it may handle some importance), wxWidgets based projects supporting Mac SDK anterior to the current OS version in which it's built should use these options (extract from one of my build commands in 2014, before I get rid of standalone SDKs): "-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5". Thus, both wxWidgets and the wxWidgets-based project target the same minimal OS X / macOS version.
Honestly, I don't know if the last SDK(s) are cumulative(s) (ie. contain previous ones with differenciation at compile time depending on passed definition as you suggest) or not. I target Mac because a non-negligible (20 to 25%) part of my apps's users are on Mac, but I'm not a Mac user myself and, by the way, I don't know the recommended practice from Apple (I even don't use XCode and switched from FSF GCC to LLVM Clang very recently only:)...
However, I think we're agree: "--with-macosx-version-min" induces you have to point the concerned SDK by a way (internal definition if it exists -- to be verified) or another (pointing it explicitely on disk using "--with-macosx-sdk").
--
EDIT: Also (it may handle some importance), wxWidgets based projects supporting Mac SDK anterior to the current OS version in which it's built should use these options (extract from one of my build commands in 2014, before I get rid of standalone SDKs): "-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5". Thus, both wxWidgets and the wxWidgets-based project target the same minimal OS X / macOS version.
Last edited by eranon on Mon Dec 18, 2017 10:02 pm, edited 1 time in total.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: [Mac] wxTextCtrl not closing dialog on Enter
As far as I know the only thing you need to build wxWidgets apps on a Macintosh is to install the Apple Command Line Tools. I do this using the CLI command xcode-select --install. The Command Line Tools include the C++ compiler suit, interface header files, and other CLI tools.eranon wrote:Did you installed, then pointed the macOS 10.12 SDK using something like...
I configured the wxWidgets library with the command ../configure --disable-shared --enable-cxx11 --prefix="$(pwd)" --with-macosx-version-min=10.12 and then use make to build the library. The library seems to build correctly and the minimal app builds without warnings.
Re: [Mac] wxTextCtrl not closing dialog on Enter
eranon,
Yes, we do agree on this point.
And as I have only old Mac with 10.8 installed I can't verify what is true on the latest OSX SDK...
Than you.
Yes, we do agree on this point.
And as I have only old Mac with 10.8 installed I can't verify what is true on the latest OSX SDK...
Than you.
Re: [Mac] wxTextCtrl not closing dialog on Enter
Osider,
But if people that will use you application will have 10.11 the app might break/crash/become unusable.
You need to pass the lowest possible SDK version that you are targetting for your users.
And I don't remember what will be the default option if you don't supply this to configure. The minimum required from wx POV is still 10.8.
Thank you.
But if people that will use you application will have 10.11 the app might break/crash/become unusable.
You need to pass the lowest possible SDK version that you are targetting for your users.
And I don't remember what will be the default option if you don't supply this to configure. The minimum required from wx POV is still 10.8.
Thank you.
Re: [Mac] wxTextCtrl not closing dialog on Enter
ONEEYEMAN,
Thanks for the observation, I'll include the --with-macosx-version-min=10.11 option as part of the runstring in my future library configurations. However, we have not yet been able to determine the root cause of the problem. So far it seems that any app built with a wxWidgets library built with the most recent (as of this writing) Command Line Tools will exhibit this and possibly other anomalies.
Thanks for the observation, I'll include the --with-macosx-version-min=10.11 option as part of the runstring in my future library configurations. However, we have not yet been able to determine the root cause of the problem. So far it seems that any app built with a wxWidgets library built with the most recent (as of this writing) Command Line Tools will exhibit this and possibly other anomalies.
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: [Mac] wxTextCtrl not closing dialog on Enter
Yes, Osider, I agree about the command line tools, but the question here is to know if your min-osx option is effective or not. And, as stated ONEEYEMAN, the only one way to be sure is to run the app in the lowest OS version you target (here, 10.12). If you build it in 10.13 with this flag and it well run in 10.12, it will be a good clue (just a clue since the 10.13 is not a major update and is relatively close to 10.12) to say if it's effective or not.
And to be really sure, it would worth to choose a min OS X version far from 10.13 (eg. --with-macosx-version-min=10.9). So, if you want, you can rebuild targetting a min OS X as 10.9 and (if you attach it here) I'll be able to tell you if it runs in 10.9.
Also, I edited my previous message above (see EDIT) but you, both, posted in the meantime: I said:
And to be really sure, it would worth to choose a min OS X version far from 10.13 (eg. --with-macosx-version-min=10.9). So, if you want, you can rebuild targetting a min OS X as 10.9 and (if you attach it here) I'll be able to tell you if it runs in 10.9.
Also, I edited my previous message above (see EDIT) but you, both, posted in the meantime: I said:
Of course, since I don't use XCode I have to build my command line, but all of this is maybe masked when you go with the XCode's IDE...EDIT: Also (it may handle some importance), wxWidgets based projects supporting Mac SDK anterior to the current OS version in which it's built should use these options (extract from one of my build commands in 2014, before I get rid of standalone SDKs): "-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5". Thus, both wxWidgets and the wxWidgets-based project target the same minimal OS X / macOS version.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: [Mac] wxTextCtrl not closing dialog on Enter
eranon,
I don't know about you, but I build the library on the command line and then the app inside the Xcode.
Even though I have 10.8 SDK I still supply the "--with-macosx-version-min=10.8". But when I create Xcode project there is no indication on the "wx-config" output which I just transfer to its options. And since I don't build wx from Xcode I don't know how to set it up.
Thank you.
I don't know about you, but I build the library on the command line and then the app inside the Xcode.
Even though I have 10.8 SDK I still supply the "--with-macosx-version-min=10.8". But when I create Xcode project there is no indication on the "wx-config" output which I just transfer to its options. And since I don't build wx from Xcode I don't know how to set it up.
Thank you.
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: [Mac] wxTextCtrl not closing dialog on Enter
Yep, I understand, ONEEYEMAN, but I don't use nor have installed the Xcode IDE (I'm using CodeBlocks in both Mac and Windows). Arghhh, I guess there should be a place to provide something like `wx-config --version=3.0 --cxxflags` in this black box
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: [Mac] wxTextCtrl not closing dialog on Enter
Ok, so I rebuilt the wxWidgets library targeting macOS 10.9 using the configuration string ../configure --disable-shared --enable-cxx11 --with-macosx-version-min=10.9 --prefix="$(pwd)" and rebuilt the minimal app. I didn't bother to create the application bundle so I'm posting here the actual binary so you can run it straight from the CLI. By the way, in my computer, which runs High Sierra, the app exhibits the anomaly.eranon wrote:So, if you want, you can rebuild targetting a min OS X as 10.9
https://nofile.io/f/bBqaVdgZWFr/osider1.zip
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: [Mac] wxTextCtrl not closing dialog on Enter
OK, here the results of my test, Osider:
1) About OS compatibility
It well runs in OS X 10.9 Mavericks (so, the macosx-version-min has been respected), but it well shows too that it has been compiled against the macOS 10.13 High Sierra SDK (running otool returns a lot of infos whose the ones below) with a compatibility to OS X 10.9.
2) About ENTER key issue
I got the same behavior than yours: it exhibits the anomaly (when I hit the ENTER key being in the text control, it does nothing). So, I would be tempted to conclude that the culprit could be the compiler version or the macOS SDK (to eliminate one of these possibilities, it should be compiled under macOS 10.13 against the 10.9 SDK -- ie. not only the backward compatibility of the SDK 10.13 -- or downgrade your clang (oops)).
EDIT: Or, remaining possibility, it's a regression in wxWidgets introduced after the 3.1 version I used (the one dowloadable from the wxWidgets's website) when I compiled the minimal_dialog.
1) About OS compatibility
It well runs in OS X 10.9 Mavericks (so, the macosx-version-min has been respected), but it well shows too that it has been compiled against the macOS 10.13 High Sierra SDK (running otool returns a lot of infos whose the ones below) with a compatibility to OS X 10.9.
Code: Select all
Last login: Tue Dec 19 08:03:29 on ttys000
ELN-OSX-M:_third eln$ otool -l ./osider1
...
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.9
sdk 10.13
...
I got the same behavior than yours: it exhibits the anomaly (when I hit the ENTER key being in the text control, it does nothing). So, I would be tempted to conclude that the culprit could be the compiler version or the macOS SDK (to eliminate one of these possibilities, it should be compiled under macOS 10.13 against the 10.9 SDK -- ie. not only the backward compatibility of the SDK 10.13 -- or downgrade your clang (oops)).
EDIT: Or, remaining possibility, it's a regression in wxWidgets introduced after the 3.1 version I used (the one dowloadable from the wxWidgets's website) when I compiled the minimal_dialog.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: [Mac] wxTextCtrl not closing dialog on Enter
Well, I proceeded to remove the Command Line Tools (CLT) from my macOS 10.13 High Sierra and install a previous version. However, I couldn't get very far because the CLT installer refused to install with the message "Command Line Tools (macOS Sierra version 10.12) can't be installed on this disk. The version of macOS is too new." How about that!
I guess we're stuck with this problem until Apple fixes the CLT. In the meantime I'm re-installing the latest CLT and going back to an earlier version of the wxWidgets library that I had built prior to switching to High Sierra. This combination does work. This is one of those times when you're happy you made regular backups of your computers hard drive.
I guess we're stuck with this problem until Apple fixes the CLT. In the meantime I'm re-installing the latest CLT and going back to an earlier version of the wxWidgets library that I had built prior to switching to High Sierra. This combination does work. This is one of those times when you're happy you made regular backups of your computers hard drive.
Re: [Mac] wxTextCtrl not closing dialog on Enter
Hi,
Try to build the old library and run it against the new OS.
The OS requirement is minimal version, so it should run without any issues.
Thank you.
Try to build the old library and run it against the new OS.
The OS requirement is minimal version, so it should run without any issues.
Thank you.
Re: [Mac] wxTextCtrl not closing dialog on Enter
No can do ONEEYEMAN. If I try to build the old known-to-be-good wxWidget library under the new OS (High Sierra and its corresponding CLT), it doesn't build. The build fails with the error "error: use of undeclared identifier 'verify_noerr'".
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: [Mac] wxTextCtrl not closing dialog on Enter
Maybe you could install a separated clang w/o to "make install" it... I did it with FSF GCC only, so I don't know what about Clang (eg. if Apple established some obscure mechanisms to prohibit the cohabitation of several versions).Osider wrote:I guess we're stuck with this problem until Apple fixes the CLT.
Yep, backups, archives and snapshots save my life several times per year tooOsider wrote:In the meantime I'm re-installing the latest CLT and going back to an earlier version of the wxWidgets library that I had built prior to switching to High Sierra. This combination does work. This is one of those times when you're happy you made regular backups of your computers hard drive.
--
EDIT: Two insteresting links: http://clang.llvm.org/get_started.html and https://embeddedartistry.com/blog/2017/ ... lvm-on-osx
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: [Mac] wxTextCtrl not closing dialog on Enter
In case anyone's looking for a (temporary) fix for the original issue:
http://trac.wxwidgets.org/ticket/18025
http://trac.wxwidgets.org/ticket/18025