开始使用 Tcl TK?

发布于 2024-07-27 20:23:59 字数 1539 浏览 7 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(12

风透绣罗衣 2024-08-03 20:23:59

我的图书馆里有一些对您可能有用的书籍:

  • Tcl 和 Tk 工具包 ( Ousterhout) - 关于 Tcl/Tk 的书,可能就是您所指的那本书。 它很旧,有些信息有点过时,但它在展示如何在 Tcl 中编程方面非常出色(而且我相信我这样说并不夸张)。 它是由该语言的创始人编写的。
  • Tcl 和 Tk 实用编程 (Welch) - 另一本关于 Tcl/Tk 的书几乎每个认真使用它进行编程的人都在他们的图书馆中拥有它。 布伦特在这本书上做得非常出色。
  • 有效的 Tcl/Tk 编程:使用 Tcl 和 Tk 编写更好的程序 (Harrison、McLennon) - 一旦您接触到更大、更复杂的程序,阅读这本书会非常方便。 它涉及组织等。 这本书可能超出了您目前的需要,但我提到它是因为当您深入了解 Tcl 时,这是一本非常好的读物。

Tcler's Wiki 也值得加入书签。 有时会让人感觉有点杂乱无章,但那里的信息比……嗯,任何地方都多。 这是一个了不起的资源。

ActiveTcl 发行版确实是一条出路。 ActiveState 的员工都是一群聪明人。

Some of the books I have in my library that you might find useful are:

  • Tcl and the Tk Toolkit (Ousterhout) - The book on Tcl/Tk, and probably the one you're referring to. It's old and some of the information is a bit out-dated, but it is fantastic (and, I believe, I say that without exaggerating) at showing how to program in Tcl. It was written by the originator of the language.
  • Practical Programming in Tcl and Tk (Welch) - The other book on Tcl/Tk that nearly everyone that programs in it seriously has in their library. Brent did an amazing job on this book.
  • Effective Tcl/Tk Programming: Writing Better Programs with Tcl and Tk (Harrison, McLennon) - Once you get to larger, more complex, programs, this book can be very handy to have read. It goes into organization and the like. This book is likely beyond what you need at the moment, but I mention it because it's a very good read as you get deeper into Tcl.

It's also worth bookmarking the Tcler's Wiki. It can feel a bit unorganized at times, but there's more information there than... well, anywhere. It's an amazing resource.

The ActiveTcl distribution is, indeed the way to go. The folks over at ActiveState are a smart bunch.

メ斷腸人バ 2024-08-03 20:23:59

您熟悉 Active Tcl 发行版吗? 如果没有,那么这是开始寻找资源和文档的最佳位置。

Are you familiar with the Active Tcl distribution? If not, then this is the best place to start looking for resources and documentation.

不必在意 2024-08-03 20:23:59

您还可以尝试 TclTutor 交互式应用程序,您不仅可以学习材料,还可以尝试立刻。

You can also try TclTutor interactive application where you can not only learn the materail but also try it at once.

审判长 2024-08-03 20:23:59

我还推荐 Tcl 和 Tk Toolkit。 它对于理解 Tcl 的核心非常有用,尽管我无法评论它作为参考的有用性(我使用在线文档)。 Tcl 和 Tk Toolkit 的第二版目前可作为“粗剪版”从 Safari Books Online 获取(这意味着您现在可以下载草稿 PDF,并在本书发布时下载最终 PDF)。 他们似乎添加了很多有关 Tk 的信息,尤其是 8.5 中引入的主题小部件。 他们还在有关 Tcl 的部分添加了一些信息,包括词典。

I also recommend Tcl and the Tk Toolkit. It is great for understanding the core of Tcl, though I can't comment on how useful it is as a reference (I use the online documentation for that). The second edition of Tcl and the Tk Toolkit is currently available as a "Rough Cut" from Safari Books Online (meaning that you can download a draft PDF now and a final PDF when the book is released). They seem to have added a bunch of information about Tk, especially the themed widgets that were introduced in 8.5. They also added some information to the section about Tcl, including dictionaries.

千紇 2024-08-03 20:23:59

但是他们推荐的书很老了,

关于 tcl 的事实是,它相当老了,Ousterhout 的书仍然是 tcl 上最好的书(恕我直言,几乎是经典)。 尽管显然正在制作中,但甚至从未出现过第二版tcl 当时是个好主意,而且也没什么坏处学习它,但它并没有跟上,坦率地说从一开始就有很多设计问题。
不要误会我的意思,我以前是 tcl 的忠实粉丝,但现在学习这并不是最好的事情。 如果您决定继续阅读,请拿起一本用过的原书并使用在线资源。

tcl 的最初目的是足够简单和自由,以消除人们为向应用程序添加交互性而编写的无数本土命令语言的需要。 后来,添加了 Tk 工具包,这是向应用程序添加 GUI 的最简单、免费的方法。

如今,有更多可用选项(例如,对于 GUI,Qt 工具包现在位于因此 LGPL 在 Tk 上几乎同样免费。
为了向现有的 C / C++ 应用程序添加命令行界面,最接近的现代工具是 Lua,但甚至像 ruby​​ 和 python 这样更强大的语言与 C/C++ 应用程序集成并不困难(特别是使用 提升 pythonSWIG)。

but the book that they recommend is quite old,

The fact about tcl is, it is quite old, the book by Ousterhout is still the best book on tcl (and IMHO, almost a classic). There was never even a second edition although one is apparently in the making. tcl was a great idea at the time and it doesn't really hurt to learn it, but it hasn't kept up and frankly had a lot of design issues from the start.
Don't get me wrong, I was a huge fan of tcl back in the day, but it's not the best thing to be learning now. If you decide to carry-on, pick up a used copy of the original book and use the online resources.

The original purpose of tcl was to be easy and free enough to eliminate the need for the myriad of home-grown command languages that folks were writing to add interactivity to their applications. Later, the Tk toolkit was added and it was the easiest, free way to add a GUI to an application.

Today, there are a lot more options available (for example for GUI's the Qt toolkit is now under the LGPL therefore almost as free at Tk.
For adding a command line interface to an existing C / C++ application, the closest modern tool is Lua, but even more powerful languages like ruby and python are not much harder to integrate with C/ C++ applications (especially with tools like boost python and SWIG).

猫性小仙女 2024-08-03 20:23:59

奥斯特豪特的书的第二版由肯·琼斯 (Ken Jones) 进行了更新和扩充,现已推出。 它的发布年份是 2010 年,所以第二版已经很流行了。 此外,维基页面 http://wiki.tcl.tk/57 有一个数字列表以某种方式处理 Tcl 的书籍。

An second edition of Ousterhout's book, updated and augmented by Ken Jones, is available. It has a release year of 2010, so the second edition is pretty current. Also, the wiki page http://wiki.tcl.tk/57 has a list of a number of books that deal with Tcl in some capacity.

烟燃烟灭 2024-08-03 20:23:59

使用这个宝贵的参考指南这个更新的快速参考(感谢 Colin Macleod)。

Use this invaluable reference guide or this more up-to-date quick ref (thanks to Colin Macleod).

鲜血染红嫁衣 2024-08-03 20:23:59

能够使用 Tcl 编程可能不会让你找到工作,但它肯定可以帮助你快速完成工作。 我早在 1996 年就学会了 Tcl,现在 Tcl 仍然是我最喜欢的编程语言之一,可以解决我的大部分日常系统管理工作。 在大多数情况下,当我的编程同事仍在设计对象类的绘图板上时,我就能够完成相同的任务。

Able to program in Tcl may not land you a job, but it certainly can help you to get the work done fast. I learned Tcl back in 1996 and Tcl is still one of my favorite programming languages in solving most of my daily sys admin work. In most cases, I am able to accomplish the same task when my programming colleagues are still on the drawing board designing the object classes.

你没皮卡萌 2024-08-03 20:23:59

除了其他评论中的精彩建议之外,我只需要添加 Philip Greenspun 的 Tcl for Web Nerd,基于 Tcl 的框架 ACS(后来成为 OpenACS)的创建者。

Besides from the great suggestions from other comments, I just have to add Tcl for Web Nerd by Philip Greenspun, the creator of the Tcl-based framework ACS (which later became OpenACS).

隔纱相望 2024-08-03 20:23:59

Tcl Wiki 上有大量信息,但很难找到。 查看最近更改页面将显示有大量活动正在进行。

There is plenty of information on the Tcl Wiki, though it can be hard to find things. A look at the Recent Changes page will show that there's plenty of activity going on.

无语# 2024-08-03 20:23:59

我是通过《TCL/TK 实用编程》学到的。 这是一个非常好的。 另外,TCL-TK 工具包书籍也非常有帮助。

I have learnt it through Practical Programming in TCL/TK. It is a very good. Along with that TCL-TK toolkit book was also very helpful.

灼痛 2024-08-03 20:23:59

我知道的最新一本书是 Clif Flynt 的 Tcl/Tk:开发人员指南。 第三版由 Morgan Kaufman 于 2012 年发布,它涵盖了(当我写这个答案时)Tcl 的当前版本:8.6

我在家里才拿到这本书一周,但它看起来相当详尽,我喜欢到目前为止所读的内容。

我拥有并读过 Ousterhout 的 Tcl 和 Tk Toolkit 以及 Welch 的 Tcl 和 Tk 实用编程(第二版),我喜欢它们。 但自从我的韦尔奇的版本出版以来,Tcl 似乎已经取得了长足的进步,并且自 Ousterhout 的版本以来也取得了非常的长足进步。 核心语言/库中添加了一些非常重要/好的东西。

(顺便说一句,我还认为对于一本近 800 页的书来说,新平装本在亚马逊上的价格非常合理。)

The most recent book I know of is Clif Flynt's Tcl/Tk: a developer's guide. The third edition was published in 2012 by Morgan Kaufman and it covers the (as I'm writing this answer) current version of Tcl: 8.6.

I've only had the book in my house for a week, but it looks to be quite thorough and I like what I've read so far.

I own and have read both Ousterhout's Tcl and the Tk Toolkit and Welch's Practical Programming in Tcl and Tk (2nd Ed) and I liked them both. But Tcl seems to have come a long way since my copy of Welch's was published and a very long way since Ousterhout's. There are some really important/nice things that have been added to the core language/library.

(Incidentally, I also thought the new paperback price was extremely reasonable on Amazon for an almost 800 page tome.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文