对于 Perl GUI,我应该使用 Perl/Tk、Tcl::Tk 还是 Tkx? [英] Should I use Perl/Tk, Tcl::Tk or Tkx for a Perl GUI?

查看:70
本文介绍了对于 Perl GUI,我应该使用 Perl/Tk、Tcl::Tk 还是 Tkx?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很喜欢 Perl/Tk,但我认为它是 DOA.我认为 Tcl::TkTkx 是更好的解决方案.假设我放弃了 Perl/Tk.最受支持"的路线是使用 Tcl::Tk(自 2007 年以来没有更新,似乎无法联系到其作者)还是 Tkx?是否积极使用/支持其中任何一个?

I really like Perl/Tk, but have come to the opinion that it's DOA. I think Tcl::Tk and Tkx are better solutions. Assume I drop Perl/Tk. Is the "most supported" route to go with Tcl::Tk (which hasn't been updated since 2007, and whose author seemingly cannot be reached), or Tkx? Are either of these actively used/supported?

推荐答案

在幕后 Tcl::TkTkx 使用 Tcl 模块作为 Tcl/Tk 的桥梁.不同之处在于它们提供给 Perl 的 API.

Under the hood both Tcl::Tk and Tkx use the Tcl module as a bridge to Tcl/Tk. The difference is in the API they present to Perl.

Tkx 由 ActiveState 开发,他们在 GUI 中使用它作为他们的工具.(例如 PPM)它被积极使用,尽管很难说有多广泛.它也受到支持,但因为它在 Tcl 上是如此薄的一层,所以没有太多支持.从某种意义上说,这是一件好事——几乎没有什么可以改变或打破的——但它确实给人一种被遗弃的印象.

Tkx was developed by ActiveState, who use it in the GUI for their tools. (e.g. PPM) It's actively used, though it's hard to say how widely. It's supported as well, but because it's such a thin layer over Tcl there's not a great deal to support. In a way that's a good thing -- there's little to change or break -- but it does give the impression of abandonware.

Tcl::Tk 作为一个副项目开始,以证明 API 与 Perl/Tk 的兼容性是可能的.我喜欢这个想法——只需要将 use Tk 更改为 use Tcl::Tk 并获得更新版本的 Tcl/Tk 的好处就太好了像瓷砖(主题)支持.不幸的是,它还没有.似乎有一些工作要做,但不是很多.它真的可以使用更多的开发人员.

Tcl::Tk started as a side project to demonstrate that API compatibility with Perl/Tk was possible. I love the idea of this -- it would be wonderful to only need to change use Tk to use Tcl::Tk and get the benefits of newer versions of Tcl/Tk like tile (theme) support. Unfortunately, it's not there yet. There seems to be some work being done, but not a lot. It could really use more developers.

就我个人而言,我使用 Tkx.如果您在 Perl/Tk 开发方面有经验,那么转换不会太痛苦,但我认为这将是一个很难开始的地方.最糟糕的是你需要参考 Tcl/Tk 文档 以便使用它.如果您了解 Tcl,那就太好了,因为连接到 Perl 的桥梁几乎不会带来什么惊喜,但如果您不了解,则从不熟悉的语言进行翻译会很尴尬.

Personally, I use Tkx. If you're experienced at developing in Perl/Tk the transition isn't too painful, but I think it would be a difficult place to start. The worst part is that you need to refer to the Tcl/Tk documentation in order to use it. That's great if you know Tcl as there are very few surprises introduced by the bridge to Perl, but if you don't it's awkward to translate from an unfamiliar language.

这篇关于对于 Perl GUI,我应该使用 Perl/Tk、Tcl::Tk 还是 Tkx?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆