1Safe Tk(n)                   Tk Built-In Commands                   Safe Tk(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       loadTk - Load Tk into a safe interpreter.
9

SYNOPSIS

11       ::safe::loadTk slave ?-use windowId? ?-display displayName?
12_________________________________________________________________
13
14       Safe  Tk  is  based on Safe Tcl, which provides a mechanism that allows
15       restricted and mediated access to auto-loading and  packages  for  safe
16       interpreters.   Safe  Tk  adds the ability to configure the interpreter
17       for safe Tk operations and load Tk into safe interpreters.
18
19

DESCRIPTION

21       The ::safe::loadTk command initializes the required data structures  in
22       the  named safe interpreter and then loads Tk into it.  The interpreter
23       must have been created with ::safe::interpCreate or have been  initial‐
24       ized with ::safe::interpInit.  The command returns the name of the safe
25       interpreter.  If -use is specified, the window identified by the speci‐
26       fied  system dependent identifier windowId is used to contain the ``.''
27       window of the safe interpreter; it can be any valid id, eventually ref‐
28       erencing  a  window belonging to another application. As a convenience,
29       if the window you plan to use is a Tk Window of the application you can
30       use  the  window  name  (e.g. .x.y) instead of its window Id ([winfo id
31       .x.y]).  When -use is not specified, a new toplevel window  is  created
32       for  the  ``.''  window of the safe interpreter. On X11 if you want the
33       embedded window to use another display than the default one, specify it
34       with  -display.   See the SECURITY ISSUES section below for implementa‐
35       tion details.
36
37

SECURITY ISSUES

39       Please read the safe manual page for Tcl to learn about the basic secu‐
40       rity considerations for Safe Tcl.
41
42       ::safe::loadTk  adds  the  value  of  tk_library  taken from the master
43       interpreter to the virtual access path of the safe interpreter so  that
44       auto-loading will work in the safe interpreter.
45
46       Tk  initialization is now safe with respect to not trusting the slave's
47       state for startup. ::safe::loadTk registers the slave's  name  so  when
48       the  Tk  initialization  (Tk_SafeInit)  is called and in turn calls the
49       master's ::safe::InitTk it will  return  the  desired  argv  equivalent
50       (-use windowId, correct -display, etc.)
51
52       When  -use is not used, the new toplevel created is specially decorated
53       so the user is always aware that the  user  interface  presented  comes
54       from  a potentially unsafe code and can easily delete the corresponding
55       interpreter.
56
57       On X11, conflicting -use and -display are likely to generate a fatal  X
58       error.
59
60

SEE ALSO

62       safe(n),   interp(n),   library(n),   load(n),  package(n),  source(n),
63       unknown(n)
64
65

KEYWORDS

67       alias,  auto-loading,  auto_mkindex,  load,  master  interpreter,  safe
68       interpreter, slave interpreter, source
69
70
71
72
73Tk                                    8.0                           Safe Tk(n)
Impressum