home *** CD-ROM | disk | FTP | other *** search
- # CVS $Id: duplicate.tcl,v 1.4 1995/04/28 11:40:46 zibi Exp $
- # This should barf gracefully when it comes across
- # a duplicate widget name
- # should get PASSED and PASSED from both these below...
- #
-
- set as [VtOpen test]
-
- set fn [VtStartForm $as.form ]
-
- set pb [VtPushButton $fn.but1]
-
- set err [catch { set pb [VtPushButton $fn.but1] } msg]
-
- if { $err } {
- echo "PASSED - msg: < $msg >"
- } else {
- echo "ERROR: didn't get an error from a duplicate name "
- }
-
- # allowDuplicateName should suppress error return...
- set err [catch { set pb [VtPushButton $fn.but1 -allowDuplicateName] } msg ]
- if { ! $err } {
- echo "PASSED : No error fm \"VtPushButton $fn.but1 -allowDuplicateName\""
- } else {
- echo "ERROR: Allow duplicate is broken <$msg>"
- }
-
- VtClose
- exit 0
-
-