Index: generic/predefined.h =================================================================== diff -u -r030722ec041bcc7a731eff1fdea9afa15a9b91a0 -rba41800193462bb1c6673f4774b56c9829cc991a --- generic/predefined.h (.../predefined.h) (revision 030722ec041bcc7a731eff1fdea9afa15a9b91a0) +++ generic/predefined.h (.../predefined.h) (revision ba41800193462bb1c6673f4774b56c9829cc991a) @@ -138,7 +138,7 @@ "::xotcl::relation ::xotcl::MetaSlot superclass ::xotcl2::Class\n" "::xotcl::MetaSlot public method slotName {name baseObject} {\n" "set slotParent ${baseObject}::slot\n" -"if {![::xotcl::is ${slotParent} object]} {\n" +"if {![::xotcl::objectproperty ${slotParent} object]} {\n" "::xotcl2::Object create ${slotParent}}\n" "return ${slotParent}::$name}\n" "::xotcl::MetaSlot method createFromParameterSyntax {target -per-object:switch {-initblock \"\"} value default:optional} {\n" @@ -227,7 +227,7 @@ "lappend methods $m}\n" "error \"Method '$method' unknown for slot [::xotcl::self]; valid are: {[lsort $methods]]}\"}\n" "::xotcl::ObjectParameterSlot public method destroy {} {\n" -"if {${:domain} ne \"\" && [::xotcl::is ${:domain} class]} {\n" +"if {${:domain} ne \"\" && [::xotcl::objectproperty ${:domain} class]} {\n" "${:domain} __invalidateobjectparameter}\n" "next}\n" "::xotcl::ObjectParameterSlot protected method init {args} {\n" @@ -236,7 +236,7 @@ "if {${:domain} ne \"\"} {\n" "if {![info exists :methodname]} {\n" "set :methodname ${:name}}\n" -"if {[::xotcl::is ${:domain} class]} {\n" +"if {[::xotcl::objectproperty ${:domain} class]} {\n" "${:domain} __invalidateobjectparameter}\n" "if {${:per-object} && [info exists :default] } {\n" "::xotcl::setinstvar ${:domain} ${:name} ${:default}}\n" @@ -257,7 +257,7 @@ "lappend methodopts required}\n" "if {[info exists :type]} {\n" "if {[string match ::* ${:type}]} {\n" -"set type [expr {[::xotcl::is ${:type} metaclass] ? \"class\" : \"object\"}]\n" +"set type [expr {[::xotcl::objectproperty ${:type} metaclass] ? \"class\" : \"object\"}]\n" "lappend objopts type=${:type}\n" "lappend methodopts type=${:type}} else {\n" "set type ${:type}}}\n" @@ -292,14 +292,14 @@ "proc ::xotcl::parametersFromSlots {obj} {\n" "set parameterdefinitions [list]\n" "foreach slot [::xotcl2::objectInfo slotobjects $obj] {\n" -"if {[::xotcl::is $obj type ::xotcl::Object] &&\n" +"if {[::xotcl::objectproperty $obj type ::xotcl::Object] &&\n" "([$slot name] eq \"mixin\" || [$slot name] eq \"filter\")} continue\n" "array set \"\" [$slot toParameterSyntax]\n" "lappend parameterdefinitions -$(oparam)}\n" "return $parameterdefinitions}\n" "::xotcl2::Object protected method objectparameter {} {\n" "set parameterdefinitions [::xotcl::parametersFromSlots [self]]\n" -"if {[::xotcl::is [self] class]} {\n" +"if {[::xotcl::objectproperty [self] class]} {\n" "lappend parameterdefinitions -parameter:method,optional}\n" "lappend parameterdefinitions \\\n" "-noinit:method,optional,noarg \\\n" @@ -323,10 +323,10 @@ "set value ::$value}\n" "return [lsearch -all -not -glob -inline $old $value]} elseif {${:elementtype} ne \"\"} {\n" "if {[string first :: $value] == -1} {\n" -"if {![::xotcl::is $value object]} {\n" +"if {![::xotcl::objectproperty $value object]} {\n" "error \"$value does not appear to be an object\"}\n" "set value [::xotcl::dispatch $value -objscope ::xotcl::self]}\n" -"if {![::xotcl::is ${:elementtype} class]} {\n" +"if {![::xotcl::objectproperty ${:elementtype} class]} {\n" "error \"$value does not appear to be of type ${:elementtype}\"}}\n" "set p [lsearch -exact $old $value]\n" "if {$p > -1} {\n" @@ -449,7 +449,7 @@ ":protected method init {} {\n" ":public method new {-childof args} {\n" "::xotcl::importvar [::xotcl::self class] {container object} withclass\n" -"if {![::xotcl::is $object object]} {\n" +"if {![::xotcl::objectproperty $object object]} {\n" "$withclass create $object}\n" "eval ::xotcl::next -childof $object $args}}}\n" "::xotcl2::Object public method contains {\n" @@ -458,16 +458,16 @@ "{-class ::xotcl2::Object}\n" "cmds} {\n" "if {![info exists object]} {set object [::xotcl::self]}\n" -"if {![::xotcl::is $object object]} {$class create $object}\n" +"if {![::xotcl::objectproperty $object object]} {$class create $object}\n" "$object requireNamespace\n" "if {$withnew} {\n" "set m [::xotcl::ScopedNew new -volatile \\\n" "-container $object -withclass $class]\n" "::xotcl2::Class mixin add $m end\n" -"if {[::xotcl::is ::xotcl::Class class]} {::xotcl::Class instmixin add $m end}\n" +"if {[::xotcl::objectproperty ::xotcl::Class class]} {::xotcl::Class instmixin add $m end}\n" "namespace eval $object $cmds\n" "::xotcl2::Class mixin delete $m\n" -"if {[::xotcl::is ::xotcl::Class class]} {::xotcl::Class instmixin delete $m}} else {\n" +"if {[::xotcl::objectproperty ::xotcl::Class class]} {::xotcl::Class instmixin delete $m}} else {\n" "namespace eval $object $cmds}}\n" "::xotcl2::Class forward slots %self contains \\\n" "-object {%::xotcl::dispatch [::xotcl::self] -objscope ::subst [::xotcl::self]::slot}\n" @@ -477,12 +477,12 @@ ":attribute objLength\n" ":method makeTargetList {t} {\n" "lappend :targetList $t\n" -"if {[::xotcl::is $t object]} {\n" +"if {[::xotcl::objectproperty $t object]} {\n" "if {[$t info hasnamespace]} {\n" "set children [$t info children]} else {\n" "return}}\n" "foreach c [namespace children $t] {\n" -"if {![::xotcl::is $c object]} {\n" +"if {![::xotcl::objectproperty $c object]} {\n" "lappend children [namespace children $t]}}\n" "foreach c $children {\n" ":makeTargetList $c}}\n" @@ -495,8 +495,8 @@ ":method copyTargets {} {\n" "foreach origin [set :targetList] {\n" "set dest [:getDest $origin]\n" -"if {[::xotcl::is $origin object]} {\n" -"if {[::xotcl::is $origin class]} {\n" +"if {[::xotcl::objectproperty $origin object]} {\n" +"if {[::xotcl::objectproperty $origin class]} {\n" "set cl [[$origin info class] create $dest -noinit]\n" "set obj $cl\n" "$cl superclass [$origin info superclass]\n" @@ -515,7 +515,7 @@ ":copyNSVarsAndCmds $origin $dest\n" "foreach i [$origin info forward] {\n" "eval [concat $dest forward $i [$origin info forward -definition $i]]}\n" -"if {[::xotcl::is $origin class]} {\n" +"if {[::xotcl::objectproperty $origin class]} {\n" "foreach i [$origin info instforward] {\n" "eval [concat $dest instforward $i [$origin info instforward -definition $i]]}}\n" "set traces [list]\n" @@ -528,7 +528,7 @@ "set def [concat $dest [lrange $def 1 end]]}\n" "$dest trace add variable $var $op $def}}}}\n" "foreach origin [set :targetList] {\n" -"if {[::xotcl::is $origin class]} {\n" +"if {[::xotcl::objectproperty $origin class]} {\n" "set dest [:getDest $origin]\n" "foreach oldslot [$origin info slots] {\n" "set newslot [::xotcl::Slot slotName [namespace tail $oldslot] $dest]\n" @@ -546,7 +546,7 @@ "if {[string trimleft $newName :] ne [string trimleft [::xotcl::self] :]} {\n" "if {$newName ne \"\"} {\n" ":copy $newName}\n" -"if {[::xotcl::is [::xotcl::self] class] && $newName ne \"\"} {\n" +"if {[::xotcl::objectproperty [::xotcl::self] class] && $newName ne \"\"} {\n" "foreach subclass [:info subclass] {\n" "set scl [$subclass info superclass]\n" "if {[set index [lsearch -exact $scl [::xotcl::self]]] != -1} {\n"