Index: library/nx/nx.tcl =================================================================== diff -u -r5fa3584b0f682d4103c39af82357713871f1de0c -r96716c484bb18d390fef1eecdca764b56121dc4d --- library/nx/nx.tcl (.../nx.tcl) (revision 5fa3584b0f682d4103c39af82357713871f1de0c) +++ library/nx/nx.tcl (.../nx.tcl) (revision 96716c484bb18d390fef1eecdca764b56121dc4d) @@ -614,7 +614,9 @@ } } } + if {[info exists type]} { + if {$type eq "switch"} {error "switch is not allowed as type for object parameter $name"} lappend opts -type $type } @@ -801,6 +803,7 @@ set objopts [list] set methodopts [list] set type "" + if {[info exists :required] && ${:required}} { lappend objopts required lappend methodopts required