Re: reusing "code entities" without oop
- From: Neil Madden <nem@xxxxxxxxxxxxx>
- Date: Thu, 29 Mar 2007 12:04:34 GMT
Stephen M. Gava wrote:
Since we've been evaluating tcl/tk for a project I've found it asserted in several places in documentation that most things that you might use oop for in other languages are achievable in a non oop way in tcl.
In python for instance (using tkinter) you might make a tailored tk control, or even a whole toplevel with all its functionality, an object. You can then instantiate this object any number of times as a way of reusing this packaged functionality.
What would be the "standard" (non oop) tcl way of acheiving this outcome, or would the best answer be to use one of the oop "addons" for this purpose?
The reason I ask is that the simplicity of pure tcl/tk is compelling for deployment reasons, but if things like the "instantiation effect" need non core addons then it probably makes more sense for us to go with a combination of python (which we are more familliar with) and tk (via tkinter).
There are ways to do this in pure Tcl. However, if your primary purpose is to create re-useable Tk components, then I'd recommend using Snit (http://wiki.tcl.tk/snit). It is itself pure Tcl code, and is very well polished for this kind of work.
-- Neil
.
- Follow-Ups:
- Re: reusing "code entities" without oop
- From: Aric Bills
- Re: reusing "code entities" without oop
- References:
- reusing "code entities" without oop
- From: Stephen M. Gava
- reusing "code entities" without oop
- Prev by Date: Re: reusing "code entities" without oop
- Next by Date: Expect a command with and without confirmation
- Previous by thread: Re: reusing "code entities" without oop
- Next by thread: Re: reusing "code entities" without oop
- Index(es):
Relevant Pages
|