1. Exploring Gui Applications
(See also Devel)
Examining or exploring a Wize application is easy.
Just use the key/mouse sequence:
<Control-Alt-Shift-2>
This opens the window config-editor,
allowing you to explore various aspects of the
running program.
2. A Sample Session
What follows is a sample session that explores the
bigtable.gui demo.
% wize -Wall bigtable.gui
or use:
% wize -Wall /
and run bigtable from Gui.
2.1 Widget Configuration
When you bring up the window editor
using mouse/key sequence <Control-Alt-Shift-2>,
[Tk::editwin] is invoked
as shown below:
You can then double-click on the Value column to edit widget values.
You may also try the following:
- hit <Control-c> to copy window path (at bottom).
- open the console from the Menu.
- in the console, type set t, space, then paste with <Control-v>.
Now try some commands in the console, eg: $t conf -bd 4.
2.2 The Menu
Hit <F10> or click on Menu in [Tk::editwin]
to bring up the menu:
This menu has numerous facilities which are discussed
in detail below.
2.3 Edit Source
Select the menu entry Edit Source: bigtable.gui.
This will bring up the source in Geditor.
2.4 Procs
The Procs menu entry will invoke [Tk::editproc]
to allow you to edit code dynamically,
right in the running program.
From the menu, select 'Procs in ::app::bigtable:
Then select EditStart and hit Enter (or double click):
Insert a line of code in the proc, eg. puts "Editing: $row"
and click Eval.
Now go back to bigtable and edit a cell by double clicking.
Note how your output appears in the xterm.
Alternatively, you can open the console window and use
putc.
2.5 Variables
The Vars menu entry invokes [Tk::editvar]
letting you examine and change variables
in the running program.
When you select 'Vars in ::app::bigtable you will see:
Then select _tod_1 and hit Enter:
Double click or hit enter to change any variable.
2.6 Window Tree
Selecting Window Tree from the Menu will invoke:
Tk::editwin .*
The current window will be selected. You can then
select a different
window and hit enter to edit it.
2.7 Namespace Tree
Selecting Namespace Tree from the Menu will invoke
[Tk::editns ::*] letting you browse the namespace tree, eg:
By default the current namespace is selected.
You can then double-click on the Procs column to edit procs,
or the Vars column to edit variables
(in that namespace).
2.8 Introspect
Introspect is a graphical application for examining and modifying the program state of Tk applications.
The default is ot start introspect inside the application
process you are
debugging.
The exec option however starts introspect as an external
process.
2.9 Edit
Edit invokes the editor on the runtime file. See Start Ted.
2.10 Start Ted
Ted is a programming editor with builtin
command completion for Tcl/Tk.
If ted is running when you invoke Edit,
then the file will be edited in Ted. Otherwise,
the builtin editor will be used.
2.11 Admin
Admin is the administrative interface into Wize.
2.12 The Status Line
Arguments can be appended to the path in the
editwin status line to be
evaluated, eg:
- add space, style names and hit enter.
- change above to style conf alt and hit enter.
Note, if the last or second last argument matches
pattern *conf then 'Tk::editwin'' is invoked
to edit widget items.
Otherwise, the results are displayed in a popup.
3. Console
A console can be opened from the editwin
menu or by typing the key sequence
<Control-Alt-Shift-space>, eg:
Any Tcl command can be typed into the console. However,
the following are most useful:
© 2008 Peter MacDonald