applicationframework.tcl

来自「是TCL的另外一个编译(解释)器」· TCL 代码 · 共 30 行

TCL
30
字号
#!/bin/sh
# The next line is executed by /bin/sh, but not by tcl \
exec wish "$0" ${1+"$@"}

################################################################################
# This is a standard template for executable Tk-applications
################################################################################

package require Tk

global AppRootDir

set AppRootDir [file dirname [info script]]
if { [file type $argv0] == "link" } {
    set AppRootDir [file dirname [file readlink $argv0]]
} else {
    set AppRootDir [file dirname $argv0]
}

proc initApp {argc argv} {
    if {$argc >= 1} {
        foreach arg $argv {
            #enter code here if application was started with additional args
        }
    } else  {
        #enter code here if application was started without args
    }
}

initApp $argc $argv

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?