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

Support native GUI on OS X #24

Open
mojca opened this issue May 17, 2016 · 5 comments
Open

Support native GUI on OS X #24

mojca opened this issue May 17, 2016 · 5 comments

Comments

@mojca
Copy link

mojca commented May 17, 2016

The Tkx module supports the native GUI on OS X, but there haven't been any commits since 2010 and I'm not sure if the development of that module is still alive.

Since Tk itself works natively on OS X, I don't understand why the Perl module needs X11. Is there any easy way to fix this? Or does the whole code depend on existence of X11?

@codebykevin
Copy link

The Tkx module still works fine. It is not a drop-in replacement for Perl Tk, but porting code over shouldn't be terribly difficult. As it is a thin wrapper over Tk, and Tk itself doesn't evolve a lot, it is not going to see a lot of development.

@eserte
Copy link
Owner

eserte commented May 30, 2017

@codebykevin: Looking at http://matrix.cpantesters.org/?dist=Tkx%201.09;reports=1#sl=7,1 it does not look like the Tkx module works for everybody. Especially there was no pass report from CPAN Testers for more than a year. And some platforms never had a pass report, e.g. FreeBSD.

@mojca: maybe it's doable, the Tk core for Perl/Tk is roughly the same as for Tcl/Tk, but probably it's not "easy".

@mojca
Copy link
Author

mojca commented May 31, 2017

One test fails for me on OS X.

@codebykevin
Copy link

Regardless of whether it passes its test suite, the module works fine for me and provides a modern Tk GUI from Perl, unlike Perl-Tk. I have it deployed in a production release of a cross-platform app that runs on Mac and Windows: https://www.codebykevin.com/filemorph.html, https://fossil.codebykevin.com/fossil.cgi/filemorph/timeline, https://www.codebykevin.com/filemorph-main.png, https://www.codebykevin.com/fm-main-windows.png

@chrstphrchvz
Copy link
Contributor

I'm curious if anyone else here has already tried Tcl::pTk::TkHijack. One effect it has is letting existing Perl/Tk programs run on macOS without XQuartz. I'm not sure how refined it is yet, though; for the program I've been trying it on, if certain idioms were used (e.g. classical menubars turning into pull-down lists) or assumptions made about the UI (e.g. label sizes), they might look strange with native UI (see before and after).

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

4 participants