9fans archive / 2001 / 05 / 418 /    prev next

From: Lucio De Re <lucio@pro...>
Subject: Re: [9fans] Limbo Tk FAQ?
Date: Fri, 25 May 2001 14:42:40 +0200

On Fri, May 25, 2001 at 01:10:55PM +0100, rog@vit... wrote:
> 
> i added a loadable module for the inferno shell to give shell access to
> tk; this also includes channels (as they're an inextricable part of the
> inferno tk interface).
> 
The inferno shell is an utter treat.

> the only part not familiar from rc is the ${...} notation which yields
> the result of a loadable-module-defined command (sort of like `{...}
> but without the uncertainty of the usual stdout tokenization)
> 
If I buy the manual set now, do I get a discount when I eventually get to
subscribe for the source licence?

> once you've defined a function to execute tk commands:
> 
> 	fn x {
> 		tk $wid $*
> 	}
> 
Is there a plumber module, too?  Or should the "fn" syntax be enhanced
as for traps?

> one can execute tk commands quite simply:
> 
> 	x button .b -text {Hello world} -command {send cmd hello, world}
> 	x pack .b
> 	x update
> 	chan cmd
> 	tk namechan $wid cmd
> 	while {} {
> 		echo ${recv cmd}
> 	}
> 
> i guess this feels somewhat like tcl; it's certainly nice for hacking
> up simple graphical interfaces to shell commands.

All you're omitting is the upvar/uplevel capability to handle call by
reference.  We can't be far from the real thing :-)

++L