对于 Perl GUI,我应该使用 Perl/Tk、Tcl::Tk 还是 Tkx?
我真的很喜欢 Perl/Tk
,但我认为它是 DOA。 我认为 Tcl::Tk
和 Tkx
是更好的解决方案。 假设我放弃了 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在引擎盖下 Tcl::Tk 和 Tkx 使用 Tcl< /a> 模块作为 Tcl/Tk 的桥梁。 区别在于它们向 Perl 提供的 API。
Tkx 由 ActiveState 开发,他们在其工具的 GUI 中使用它。 (例如 PPM)它被积极使用,但很难说有多广泛。 它也受到支持,但因为它是 Tcl 上的一个薄层,所以没有太多支持。 从某种意义上说,这是一件好事——几乎没有什么需要改变或破坏的——但它确实给人一种废弃软件的印象。
Tcl::Tk 最初是作为一个副项目来证明 API 与 Perl/Tk 的兼容性是可能的。 我喜欢这个想法 - 只需将
use Tk
更改为use Tcl::Tk
并获得新版本 Tcl/Tk 的好处,那就太棒了像瓷砖(主题)支持。 不幸的是,它还没有出现。 似乎正在做一些工作,但不是很多。 它确实需要更多的开发人员。就我个人而言,我使用 Tkx。 如果您有 Perl/Tk 开发经验,那么过渡并不会太痛苦,但我认为这将是一个困难的起点。 最糟糕的是您需要参考 Tcl/Tk 文档 以便使用它。 如果您了解 Tcl,那就太好了,因为到 Perl 的桥梁很少会带来什么惊喜,但如果您不了解,那么从不熟悉的语言进行翻译就会很尴尬。
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 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 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
touse 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.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.
我使用 wxPerl、这是一篇关于 O'Reilly 的短文
注意: 我的目标是 win32,这个大约5年前。
I have had good result with wxPerl, here is a short article on O'Reilly
Note: I was targeting win32 and this was about 5 years ago.