Perl/Tkx:Tk风格 VS Perl OO 风格

Posted on 2012年10月17日 21:30

  •  

原文地址:http://www.tkdocs.com/tutorial/concepts.html

What's somewhat scary about the Tkx module is that it implements all of this on a purely syntactic level. That is, it has no clue about buttons and entries and grid. It just knows that if it sees a method "new_something" it's creating a widget using the Tcl command "something", or if you call a method "g_otherthing", that it's going to invoke a Tcl command "otherthing", and pass the widget pathname associated with the object as a first parameter (followed by any other parameters passed to the method).

Tcl 命令 "somwthing" 写成 $父元件->new_something,也可以用 g_something(pathname)

继续阅读