delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/15/13:56:58

X-Spam-Check-By: sourceware.org
X-Webmail-User: drg AT localhost
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
X-Http_host: merle.it.northwestern.edu
From: d-gitelman AT northwestern DOT edu
Subject: Re: problem with running tcl/tk scripts
Date: Mon, 15 Jan 2007 12:56:30 -0600
Reply-To: d-gitelman AT northwestern DOT edu
X-Mailer: EMUmail 5.2.7 (UA Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1))
Message-Id: <20070115185630.495422F07C@merle.it.northwestern.edu>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Dave:

Thank you very much! That worked part way. 

It now properly runs this command when I call it from the command line.
    exec sh -c /usr/local/fsl/bin/Fdt_gui &

However, it the buttons in the GUI still do not work.  For some reason the command in the button is 
not executed. The button is setup just fine but pressing it does nothing. Again if I substitue the
name of an actual .exe file for Fdt$gui_ext then the button works. Here is the button code.

if { [ file exists ${FSLDIR}/tcl/fdt.tcl ] } {
     button $w.f1.fdt -text "FDT Diffusion" \
             -command { exec sh -c "${FSLDIR}/bin/Fdt$gui_ext" & }
     pack $w.f1.fdt -in $w.f1 -fill x -padx 1 -pady 1
}

also note that getting rid of the variables ${FSLDIR} and $gui_ext so the command line is written
-command { exec sh -c "/usr/local/fsl/bin/Fdt_gui" & }   does not work so it's not a variable
expansion issue.

So based on your suggestion I then ran d2u on every text file in this distribution I could find and 
certainly every .tcl file. (I assume it is called as d2u name_of_file? Anyway it made no difference. 

I did try substituting some commands in the Runtcl file (Fdt_gui is a link to Runtcl) which was in
the last email. Those commands do not even get executed when the button is pressed so if the
command above references a script file and not a .exe file there is something broken in how it
handles the exec sh.... call. 

again, any thoughts appreciated.

Regards,
Darren

On 15 January 2007 07:04, Dave Kore wrote:
> In the older version (1.5.18-1)
>   the dialog I expect to see appears.
> 
> In the newer version (1.5.19) I see the following errors
> 
>> command not foundsr/local/fsl/bin/Fdt_gui: line 2:
> ': not a valid identifieri: line 4: export: `TCLTKSHELL
>> command not foundFdt_gui: line 5:
> /usr/local/fsl/bin/Fdt_gui: line 12: syntax error near unexpected token `('
> 'usr/local/fsl/bin/Fdt_gui: line 12: `set FSLDIR $env(FSLDIR)
> [1]+  Exit 2                  exec sh -c /usr/local/fsl/bin/Fdt_gui
> 
> 
> 
> Any ideas would be appreciated, and please let me know if more information
> is needed.

  You have DOS line endings.  Try d2u on it.  This is a consequence of the
newer versions of bash, rather than anything that changed in the cygwin dll
itself.


    cheers,
      DaveK



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019