tk useinputmethods
Gives or sets a flag for the use of input methods.
tk useinputmethods ?-displayof WINDOW? ?BOOLEAN?
Description
The flag is 0 at the start. With BOOLEAN, sets the flag and gives it. In ztk the flag is stored with no effect.
Returns
1 or 0.
Examples
% tk useinputmethods
0
% tk useinputmethods yes
1
Errors
# Tcl 9.1 only
% tk useinputmethods maybe
cannot use non-numeric string "maybe" as operand of "!"
-errorcode ARITH DOMAIN {non-numeric string}
# Tcl 8.6 only
% tk useinputmethods maybe
can't use non-numeric string as operand of "!"
-errorcode ARITH DOMAIN {non-numeric string}
Differences from Tcl
- The flag is stored with no effect, and it is 0 at the start. On Tk 8.6.16 on X11 it is 1 when the display has an input method, and it turns the input method on and off.
- A value that is not a boolean gives the error of an
exproperator, such ascannot use non-numeric string "maybe" as operand of "!". Tk 8.6.16 givesexpected boolean value but got "maybe".
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1