beetlebug▾
/

tk appname

Gives or sets the name of the app.

tk appname ?NEWNAME?

Description

At the start the name is the name of the script file, as in wish: the last name of its path, with no extension on Windows (editor for C:\apps\editor.tcl, editor.tcl on Linux and macOS). With no script, it is ztk. With NEWNAME, sets the name and gives it.

Returns

The name of the app.

Examples

% tk appname editor
editor

% tk appname editor; tk appname
editor

Errors

% tk appname a b
wrong # args: should be "tk appname ?newName?"
-errorcode NONE

Differences from Tcl

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1