I think this is a bug. If you follow the steps below, the file that
is saved will execute properly, but within vtcl, it will not run in
TEST mode. If you do File/Source, and source the file that was saved,
_then_ it operates properly in test mode.

Do the following:

- run vtcl (1.08)
- create toplevel
  - create frame in toplevel
  - create button in frame
  - change button text to "Create Window"
  - set button command to "Window show $widget(child)"
- create another toplevel 
  - set alias to "child"
  - create frame in toplevel
  - create button in frame
  - change button text to "Hide Window"
  - set button command to "Window hide $widget(child)"
  - hide toplevel using the toplevel control window
- Save/FileAs "test1.tcl"
- change to TEST mode
- click "Create Window", and nothing happens!  :-(
- Click File/Source, and source "test1.tcl"
- now, in test mode, "Create Window" works!  :-)

Also, if you select "File/Save" above, it gives an error trying
to save the file even after the FileSelector is presented and you give it 
a file name. You must select "File/SaveAs" the first time.

BTW, is the above the normal recommended way of creating and
dismissing "secondary" toplvels?
I notice that I can put "Window destroy $widget(child)" as the
command for the "Hide Window" button and the application runs properly.
You can create and delete the second toplevel indefinitely.
However, if you run this in TEST mode, you're dead in the water when you
click on the "Hide Window" button. It deletes the toplevel and you can't
get it back. Is this a bug?

Which reminds me, the toplevel control window doesn't have a safeguard
"Are You Sure?" prompt when you click on the "Delete" button. It just goes
and it's gone! 

Sorry for putting several issues into one post...

...RickM...

Reply via email to