diff options
author | stanton <stanton@noemail.net> | 1998-06-25 17:21:01 (GMT) |
---|---|---|
committer | stanton <stanton@noemail.net> | 1998-06-25 17:21:01 (GMT) |
commit | 26b7df3aa76e598b0ce6774433d598ee5ed3f392 (patch) | |
tree | 1829fa4225b5ea3a8f8578471ffe02463efaabcd /tests | |
parent | 7e5436b342a6d0c457422f29d72777c4366d848d (diff) | |
download | tk-26b7df3aa76e598b0ce6774433d598ee5ed3f392.zip tk-26b7df3aa76e598b0ce6774433d598ee5ed3f392.tar.gz tk-26b7df3aa76e598b0ce6774433d598ee5ed3f392.tar.bz2 |
*** empty log message ***
FossilOrigin-Name: d0d81921d36f4393a8920ea77c73867caef4e4d7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/filebox.test | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/tests/filebox.test b/tests/filebox.test index 83f320c..c687b0b 100644 --- a/tests/filebox.test +++ b/tests/filebox.test @@ -40,7 +40,11 @@ proc PressButton {btn} { proc EnterFileByKey {parent fileName fileDir} { global tk_strictMotif - set w .__tk_filedialog + if {$parent == "."} { + set w .__tk_filedialog + } else { + set w $parent.__tk_filedialog + } upvar #0 [winfo name $w] data if {$tk_strictMotif} { @@ -57,7 +61,11 @@ proc EnterFileByKey {parent fileName fileDir} { proc SendButtonPress {parent btn type} { global tk_strictMotif - set w .__tk_filedialog + if {$parent == "."} { + set w .__tk_filedialog + } else { + set w $parent.__tk_filedialog + } upvar #0 [winfo name $w] data set button $data($btn\Btn) @@ -205,6 +213,37 @@ foreach mode $modes { -initialfile $fileName] } $pathName + test filebox-2.5 "$command command" { + ToPressButton $parent ok + set choice [$command -title "Enter \"$fileName\" and press Ok" \ + -parent $parent -initialdir /badpath \ + -initialfile $fileName] + } $pathName + + test filebox-2.6 "$command command" { + toplevel .t1; toplevel .t2 + ToPressButton .t1 ok + set choice {} + lappend choice [$command \ + -title "Enter \"$fileName\" and press Ok" \ + -parent .t1 -initialdir $fileDir \ + -initialfile $fileName] + ToPressButton .t2 ok + lappend choice [$command \ + -title "Enter \"$fileName\" and press Ok" \ + -parent .t2 -initialdir $fileDir \ + -initialfile $fileName] + ToPressButton .t1 ok + lappend choice [$command \ + -title "Enter \"$fileName\" and press Ok" \ + -parent .t1 -initialdir $fileDir \ + -initialfile $fileName] + destroy .t1 + destroy .t2 + set choice + } [list $pathName $pathName $pathName] + + set filters(1) {} |