From owner-freebsd-libh Tue Oct 9 18:45:20 2001 Delivered-To: freebsd-libh@freebsd.org Received: from tomts5-srv.bellnexxia.net (tomts5.bellnexxia.net [209.226.175.25]) by hub.freebsd.org (Postfix) with ESMTP id ED9E837B401 for ; Tue, 9 Oct 2001 18:45:15 -0700 (PDT) Received: from khan.anarcat.dyndns.org ([65.94.128.156]) by tomts5-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011010014514.NSRS27768.tomts5-srv.bellnexxia.net@khan.anarcat.dyndns.org> for ; Tue, 9 Oct 2001 21:45:14 -0400 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 5924B19F7 for ; Tue, 9 Oct 2001 21:45:10 -0400 (EDT) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 6F5F120C07; Tue, 9 Oct 2001 21:45:20 -0400 (EDT) Date: Tue, 9 Oct 2001 21:45:20 -0400 From: The Anarcat To: Libh Subject: Re: bug in Hui::run? Message-ID: <20011009214519.D603@shall.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Libh References: <20011009212837.B603@shall.anarcat.dyndns.org> <20011009214227.C603@shall.anarcat.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wTWi5aaYRw9ix9vO" Content-Disposition: inline In-Reply-To: <20011009214227.C603@shall.anarcat.dyndns.org> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --wTWi5aaYRw9ix9vO Content-Type: multipart/mixed; boundary="hoZxPH4CaxYzWscb" Content-Disposition: inline --hoZxPH4CaxYzWscb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable AAAAAAAAARGHJ! ok, that's it for tonight.=20 here's the file. A. --hoZxPH4CaxYzWscb Content-Type: application/x-tcl Content-Disposition: attachment; filename="console.tcl" Content-Transfer-Encoding: quoted-printable proc read_cmd {hui button data} {=0A=0A global command=0A cons_append= [eval [$command text]]=0A}=0A=0Aproc cons_append {string} {=0A global c= ons_out=0A =0A $cons_out text [format "%s%s\n" [$cons_out text] $string= ]=0A=0A}=0A=0A# Create the main-window and its elements=0Aproc cons_make_ma= in_win {hui} {=0A global command=0A global cons_w=0A global cons_o= ut=0A =0A # Create a main_window with title, x/y offset and x/y size= =0A set cons_w [$hui window cons_w "Console" "0 0" "25 5" "vertical"] = =0A =0A set cmd_cont [$cons_w container "container"]=0A # Define t= he widget we want to add=0A set command [$cmd_cont inputLine "Console Co= mmand" "" -1]=0A $command resize {10 10}=0A $cmd_cont button "gobutto= n" "&Eval" {read_cmd ""} "default"=0A =0A set cons_out [$cons_w textE= dit "Console Output" "" FALSE]=0A =0A # Finally, show the window=0A = $cons_w show=0A}=0A=0A# Init UI=0Aset hui [Hui::open "auto"]=0A=0A# Creat= e the main-window=0Acons_make_main_win $hui=0A=0A# Run hui=0A$hui run=0A=0A= # proc init_console {hui} {=0A# global console=0A# global console_o= ut=0A =0A# # Create a main_window with title, x/y offset and x/y siz= e=0A# set console_window [$hui window console_window "Hello World in li= bh" "0 0" "25 5" "vertical"] =0A =0A# # Define the widget we want to= add=0A# set console_out [$console_window textEdit "console_out" "" TRU= E]=0A =0A# # Finally, show the window=0A# $console_out show=0A= =0A# # set console [$hui window "console_window" "Console" "14 0" "50 2= 0"]=0A# # $console show=0A=0A# # $console erase=0A# # $console = arrange "vertical"=0A=0A# # set command [$console textEdit "command_fie= ld" "" 1 "TCLH Command" "0 0" "5 10"]=0A# # $command resize "-1 1"=0A= =0A# # set cont [$console container "container" "0 0" "free"]=0A# # = $cont resize "-1 2"=0A# # set console_out [$console textEdit "console_= output" "" 0 "Console Output" "0 0" "5 10"]=0A# # $console resize "-1 5= "=0A=0A# }=0A=0A# init_console $hui=0A=0A# $hui run --hoZxPH4CaxYzWscb-- --wTWi5aaYRw9ix9vO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjvDqC8ACgkQttcWHAnWiGdIMwCfeSYyDDPMBsDgmh/J38Qy7SrN d5QAn3P4GfTYp47TIQHRA30UfovlITEi =Ai1G -----END PGP SIGNATURE----- --wTWi5aaYRw9ix9vO-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message