File: script_get_line

package info (click to toggle)
grass 6.0.2-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 40,044 kB
  • ctags: 31,303
  • sloc: ansic: 321,125; tcl: 25,676; sh: 11,176; cpp: 10,098; makefile: 5,025; fortran: 1,846; yacc: 493; lex: 462; perl: 133; sed: 1
file content (37 lines) | stat: -rwxr-xr-x 668 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!nviz -f
# This file allows the user to input a line for output
# to a script.  We do this in a separate file so that
# the events processed here are not sent to the script
# file.

destroy .wait_ok

global src_boot

source $src_boot/etc/nviz2.2/scripts/config.tcl

# Create a simple label and entry widget
set done -1
label .l -text "Add Script Line"
entry .e -width 80 -relief sunken
frame .f
button .f.bok -text "Ok" -command {set done 1}
button .f.bcancel -text "Cancel" -command {set done 0}
pack .f.bok .f.bcancel -side left -fill both -expand yes
pack .l .e .f -fill x
tkwait variable done

if $done {
    puts "[.e get]"
} else {
    puts "-1"
}

exit