Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old November 9th, 2004, 08:16 PM
sarwar sarwar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Pennsylvania
Posts: 49 sarwar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 51 m 48 sec
Reputation Power: 5
interface of tcl/tk and perl

Hi all,

I don't know whether this is right place to ask tcl/tk question. If not can someone guide me where to put this question ?

I am trying to write a small tk GUI which could interact with my Perl code running at back ground. Perl code takes 5 arguments, input file, output file, and three variables. It is working fine with command line. I am writing the code for tk GUI, but the variables interface between GUI and perl is not working and it seems that its not taking the values from GUI. So there is some problem with the binding variables which I am trasfering to exec command.

Can someone help in fixing the code.

thanks

Code:
#!/usr/local/bin/wish -f

button .run -text RUN
pack .run -side right

label .label1 -text "I/P file name:"

label .label2 -text "O/P file name:"

entry .entry1 -width 20 -relief sunken -bd 2
set p {puts [.entry1 get]}

entry .entry2 -width 20 -relief sunken -bd 2
set q {puts [.entry2 get]}

pack .label1 .entry1 -side top -padx 1m -pady 2m
pack .label2 .entry2 -side top -padx 1m -pady 2m

frame .left
frame .middle
frame .right

foreach size {1024 2048 4096} {
    radiobutton .pts$size -text "$size" -relief flat -variable pts -value $size
}
set r  {puts [.pts$size get]}

foreach val {1 2 3} {
    radiobutton .vol$val -text "$val" -relief flat -variable vol -value $val
}
set s {puts [.vol$val get]}

foreach tech {65 90 130} {
    radiobutton .nano$tech -text "$tech" -relief flat -variable nano -value $tech
}
set t  {puts [.nano$tech get]}

pack .left -side left -padx 3m -pady 3m
pack .middle -side left -padx 3m -pady 3m
pack .right -side right -padx 3m -pady 3m

pack .pts1024 .pts2048 .pts4096 -in .left -side top -anchor w

pack .vol1 .vol2 .vol3 -in .middle -side top -anchor w
pack .nano65 .nano90 .nano130 -in .right -side top -anchor w

bind .run <Button-1> {exec test2.pl $p $q $r $s $t}

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > interface of tcl/tk and perl


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway