Index: TODO =================================================================== diff -u -r1008a85cf8fe5d95365568f6c765a83389028ff2 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- TODO (.../TODO) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) +++ TODO (.../TODO) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -1230,6 +1230,9 @@ - replaced ::nsf::cmd::ClassInfo2 by ::nsf::cmd::ClassInfo - replaced ::nsf::cmd::ObjectInfo2 by ::nsf::cmd::ObjectInfo +- replaced argument order on objectproperty to make it conformant with Tcl conventions +- updated migration guide + TODO: - reflect changes in /is/objectproperty/info has/info is/ in migration guide - check equivalence of the following two commands Index: doc/next-migration.html =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- doc/next-migration.html (.../next-migration.html) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ doc/next-migration.html (.../next-migration.html) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -1222,41 +1222,31 @@ obj istype sometype - TODO: ::nsf::objectproperty and/or - ::nx::objectproperty and/or nx::is?

- ::nsf::objectproperty obj type sometype
-


- obj info is type sometype + obj info has type sometype obj ismixin cls - ::nsf::objectproperty obj mixin cls
-
- obj info is mixin cls + obj info has mixin cls obj isclass ?cls? - ::nsf::objectproperty obj|cls class
-
- obj info is class + obj info is class obj ismetaclass cls - ::nsf::objectproperty obj|cls metaclass -
+ obj info is metaclass n.a. - ::nsf::objectproperty cls baseclass -
- cls info is baseclass + + obj info is baseclass @@ -1445,6 +1435,6 @@
- Last modified: Tue Aug 31 21:43:43 CEST 2010 + Last modified: Wed Sep 1 11:08:17 CEST 2010 Index: generic/gentclAPI.decls =================================================================== diff -u -r1008a85cf8fe5d95365568f6c765a83389028ff2 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -125,8 +125,8 @@ {-argName "toNs" -required 1 -type tclobj} } xotclCmd objectproperty XOTclObjectpropertyCmd { - {-argName "object" -required 1 -type tclobj} {-argName "objectkind" -type "object|class|baseclass|metaclass"} + {-argName "object" -required 1 -type tclobj} } xotclCmd parametercheck XOTclParametercheckCmd { {-argName "-nocomplain"} Index: generic/tclAPI.h =================================================================== diff -u -r1008a85cf8fe5d95365568f6c765a83389028ff2 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- generic/tclAPI.h (.../tclAPI.h) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) +++ generic/tclAPI.h (.../tclAPI.h) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -298,7 +298,7 @@ static int XOTclMyCmd(Tcl_Interp *interp, int withLocal, Tcl_Obj *method, int nobjc, Tcl_Obj *CONST nobjv[]); static int XOTclNSCopyCmds(Tcl_Interp *interp, Tcl_Obj *fromNs, Tcl_Obj *toNs); static int XOTclNSCopyVars(Tcl_Interp *interp, Tcl_Obj *fromNs, Tcl_Obj *toNs); -static int XOTclObjectpropertyCmd(Tcl_Interp *interp, Tcl_Obj *object, int objectkind); +static int XOTclObjectpropertyCmd(Tcl_Interp *interp, int objectkind, Tcl_Obj *object); static int XOTclParametercheckCmd(Tcl_Interp *interp, int withNocomplain, Tcl_Obj *param, Tcl_Obj *value); static int XOTclQualifyObjCmd(Tcl_Interp *interp, Tcl_Obj *name); static int XOTclRelationCmd(Tcl_Interp *interp, XOTclObject *object, int relationtype, Tcl_Obj *value); @@ -1857,11 +1857,11 @@ &pc) != TCL_OK) { return TCL_ERROR; } else { - Tcl_Obj *object = (Tcl_Obj *)pc.clientData[0]; - int objectkind = (int )PTR2INT(pc.clientData[1]); + int objectkind = (int )PTR2INT(pc.clientData[0]); + Tcl_Obj *object = (Tcl_Obj *)pc.clientData[1]; parseContextRelease(&pc); - return XOTclObjectpropertyCmd(interp, object, objectkind); + return XOTclObjectpropertyCmd(interp, objectkind, object); } } @@ -2270,8 +2270,8 @@ {"toNs", 1, 0, convertToTclobj}} }, {"::nsf::objectproperty", XOTclObjectpropertyCmdStub, 2, { - {"object", 1, 0, convertToTclobj}, - {"objectkind", 0, 0, convertToObjectkind}} + {"objectkind", 0, 0, convertToObjectkind}, + {"object", 1, 0, convertToTclobj}} }, {"::nsf::parametercheck", XOTclParametercheckCmdStub, 3, { {"-nocomplain", 0, 0, convertToString}, Index: generic/xotcl.c =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- generic/xotcl.c (.../xotcl.c) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ generic/xotcl.c (.../xotcl.c) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -12053,11 +12053,11 @@ /* xotclCmd objectproperty XOTclObjectpropertyCmd { - {-argName "object" -required 1 -type tclobj} {-argName "objectkind" -type "object|class|baseclass|metaclass"} + {-argName "object" -required 1 -type tclobj} } */ -static int XOTclObjectpropertyCmd(Tcl_Interp *interp, Tcl_Obj *obj, int objectkind) { +static int XOTclObjectpropertyCmd(Tcl_Interp *interp, int objectkind, Tcl_Obj *obj) { int success = TCL_ERROR; XOTclObject *object; Index: library/lib/doc-tools.tcl =================================================================== diff -u -re29308a6c15da697df375716a3ae3787ade64218 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision e29308a6c15da697df375716a3ae3787ade64218) +++ library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -552,7 +552,7 @@ # requested (from the part_attribute) applicable to the # partof object, which is the object behind [$domain name]? if {[info exists :scope] && - ![::nsf::objectproperty [$domain name] ${:scope}]} { + ![::nsf::objectproperty name [$domain] ${:scope}]} { error "The entity '[$domain name]' does not qualify as '${:scope}'" } next @@ -1136,7 +1136,7 @@ if {[::nsf::isobject $thing]} { if {[$thing eval {info exists :__initcmd}]} { - :analyze_initcmd [expr {[::nsf::objectproperty $thing class]?"@class":"@object"}] $thing [$thing eval {set :__initcmd}] + :analyze_initcmd [expr {[::nsf::objectproperty class $thing]?"@class":"@object"}] $thing [$thing eval {set :__initcmd}] } } elseif {![catch {package present $thing} msg]} { # For tcl packages, we assume that the package is sourceable @@ -1950,7 +1950,7 @@ :method parse@tag {line} { puts stderr "PART parse@tag [current]" set r [next] - if {[::nsf::objectproperty $r object] && [$r info has type ::nx::doc::Entity]} { + if {[::nsf::objectproperty object $r] && [$r info has type ::nx::doc::Entity]} { set :current_part $r } return $r Index: library/nx/nx.tcl =================================================================== diff -u -re29308a6c15da697df375716a3ae3787ade64218 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- library/nx/nx.tcl (.../nx.tcl) (revision e29308a6c15da697df375716a3ae3787ade64218) +++ library/nx/nx.tcl (.../nx.tcl) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -347,7 +347,7 @@ set methodName [lindex $path end] foreach w [lrange $path 0 end-1] { #puts stderr "check $object info methods $path @ <$w>" - set scope [expr {[nsf::objectproperty $object class] && !${per-object} ? "Class" : "Object"}] + set scope [expr {[nsf::objectproperty class $object] && !${per-object} ? "Class" : "Object"}] if {[$object ::nsf::cmd::${scope}Info::methods -methodtype all $w] eq ""} { # # Create dispatch/ensemble object and accessor method (if wanted) @@ -531,7 +531,7 @@ # Default unknown-handler for Object # - # Actually, we do not need thios unknwon handler, but we could + # Actually, we do not need this unknown handler, but we could # define it as follows: # # :protected method unknown {m args} { @@ -756,7 +756,7 @@ set parent [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::parent] set grandparent [::nsf::dispatch $parent ::nsf::cmd::ObjectInfo::parent] set tail [namespace tail $parent] - if {$tail eq "slot" && [::nsf::objectproperty $grandparent class]} { + if {$tail eq "slot" && [::nsf::objectproperty class $grandparent]} { set aliases [::nsf::dispatch $grandparent ::nsf::cmd::ClassInfo::methods -methodtype alias] foreach alias $aliases { set def [::nsf::dispatch $grandparent ::nsf::cmd::ClassInfo::method definition $alias] @@ -778,7 +778,7 @@ set path $(name) while {1} { set o [::nsf::dispatch $o ::nsf::cmd::ObjectInfo::parent] - if {![::nsf::objectproperty $o type ::nx::EnsembleObject]} break + if {![::nsf::objectproperty type $o ::nx::EnsembleObject]} break array set "" [$o ::nsf::classes::nx::EnsembleObject::subcmdName] set path "$(name) $path" } @@ -1216,7 +1216,7 @@ } ObjectParameterSlot public method destroy {} { - if {${:domain} ne "" && [::nsf::objectproperty ${:domain} class]} { + if {${:domain} ne "" && [::nsf::objectproperty class ${:domain}]} { ::nsf::invalidateobjectparameter ${:domain} } ::nsf::next @@ -1230,7 +1230,7 @@ if {![info exists :methodname]} { set :methodname ${:name} } - if {[::nsf::objectproperty ${:domain} class]} { + if {[::nsf::objectproperty class ${:domain}]} { ::nsf::invalidateobjectparameter ${:domain} } if {${:per-object} && [info exists :default] } { @@ -1273,7 +1273,7 @@ } if {[info exists :type]} { if {[string match ::* ${:type}]} { - set type [expr {[::nsf::objectproperty ${:type} metaclass] ? "class" : "object"}] + set type [expr {[::nsf::objectproperty metaclass ${:type}] ? "class" : "object"}] lappend objopts type=${:type} lappend methodopts type=${:type} } else { @@ -1340,7 +1340,7 @@ if {![::nsf::dispatch $slot ::nsf::cmd::ObjectInfo::hastype ::nx::Slot]} continue # Skip some slots for xotcl; # TODO: maybe different parameterFromSlots for xotcl? - if {[::nsf::objectproperty ::xotcl::Object class] + if {[::nsf::objectproperty class ::xotcl::Object] && [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::hastype ::xotcl::Object] && ([$slot name] eq "mixin" || [$slot name] eq "filter") } continue @@ -1354,7 +1354,7 @@ Object protected method objectparameter {{lastparameter __initcmd:initcmd,optional}} { #puts stderr "... objectparameter [::nsf::current object]" set parameterdefinitions [::nsf::parametersFromSlots [::nsf::current object]] - if {[::nsf::objectproperty [::nsf::current object] class]} { + if {[::nsf::objectproperty class [::nsf::current object]]} { lappend parameterdefinitions -parameter:method,optional } lappend parameterdefinitions \ @@ -1406,7 +1406,7 @@ } set value [::nsf::dispatch $value -objscope ::nsf::current object] } - if {![::nsf::objectproperty ${:elementtype} class]} { + if {![::nsf::objectproperty class ${:elementtype}]} { error "$value does not appear to be of type ${:elementtype}" } } @@ -1778,14 +1778,14 @@ ################################################################## Slot method type=baseclass {name value} { - if {![::nsf::objectproperty $value baseclass]} { + if {![::nsf::objectproperty baseclass $value]} { error "expected baseclass but got \"$value\" for parameter $name" } return $value } Slot method type=metaclass {name value} { - if {![::nsf::objectproperty $value metaclass]} { + if {![::nsf::objectproperty metaclass $value]} { error "expected metaclass but got \"$value\" for parameter $name" } return $value @@ -1836,10 +1836,10 @@ -container $object -withclass $class] Class mixin add $m end # TODO: the following is not pretty; however, contains might build xotcl1 and next objects. - if {[::nsf::objectproperty ::xotcl::Class class]} {::xotcl::Class instmixin add $m end} + if {[::nsf::objectproperty class ::xotcl::Class]} {::xotcl::Class instmixin add $m end} namespace eval $object $cmds Class mixin delete $m - if {[::nsf::objectproperty ::xotcl::Class class]} {::xotcl::Class instmixin delete $m} + if {[::nsf::objectproperty class ::xotcl::Class]} {::xotcl::Class instmixin delete $m} } else { namespace eval $object $cmds } @@ -1905,7 +1905,7 @@ set dest [:getDest $origin] if {[::nsf::isobject $origin]} { # copy class information - if {[::nsf::objectproperty $origin class]} { + if {[::nsf::objectproperty class $origin]} { set cl [[$origin info class] create $dest -noinit] # class object set obj $cl @@ -1935,7 +1935,7 @@ ::nsf::forward $dest -per-object $i {*}[$origin ::nsf::cmd::ObjectInfo::forward -definition $i] } - if {[::nsf::objectproperty $origin class]} { + if {[::nsf::objectproperty class $origin]} { foreach i [$origin ::nsf::cmd::ClassInfo::forward] { ::nsf::forward $dest $i {*}[$origin ::nsf::cmd::ClassInfo::forward -definition $i] } @@ -1958,7 +1958,7 @@ } # alter 'domain' and 'manager' in slot objects for classes foreach origin [set :targetList] { - if {[::nsf::objectproperty $origin class]} { + if {[::nsf::objectproperty class $origin]} { set dest [:getDest $origin] foreach oldslot [$origin info slots] { set newslot [::nx::slotObj $dest [namespace tail $oldslot]] @@ -1991,7 +1991,7 @@ :copy $newName } ### let all subclasses get the copied class as superclass - if {[::nsf::objectproperty [::nsf::current object] class] && $newName ne ""} { + if {[::nsf::objectproperty class [::nsf::current object]] && $newName ne ""} { foreach subclass [:info subclass] { set scl [$subclass info superclass] if {[set index [lsearch -exact $scl [::nsf::current object]]] != -1} { Index: library/serialize/serializer.tcl =================================================================== diff -u -r1008a85cf8fe5d95365568f6c765a83389028ff2 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- library/serialize/serializer.tcl (.../serializer.tcl) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) +++ library/serialize/serializer.tcl (.../serializer.tcl) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -654,7 +654,7 @@ } :method method-serialize {o m modifier} { - if {![::nsf::objectproperty $o class]} {set modifier ""} + if {![::nsf::objectproperty class $o]} {set modifier ""} return [$o {*}$modifier info method definition $m] } Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -r1008a85cf8fe5d95365568f6c765a83389028ff2 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -475,7 +475,7 @@ :alias forward ::nsf::cmd::ObjectInfo::forward :alias hasnamespace ::nsf::cmd::ObjectInfo::hasnamespace :proc invar {} {::nsf::assertion [self] object-invar} - #:proc is {kind} {::nsf::objectproperty [::nsf::current object] $kind} + #:proc is {kind} {::nsf::objectproperty object [::nsf::current] $kind} :proc methods { -nocmds:switch -noprocs:switch -incontext:switch pattern:optional @@ -591,13 +591,13 @@ # emulation of isobject, isclass ... Object instproc isobject {{object:substdefault "[self]"}} {::nsf::isobject $object} - Object instproc isclass {{class:substdefault "[self]"}} {::nsf::objectproperty $class class} - Object instproc ismetaclass {{class:substdefault "[self]"}} {::nsf::objectproperty $class metaclass} + Object instproc isclass {{class:substdefault "[self]"}} {::nsf::objectproperty class $class} + Object instproc ismetaclass {{class:substdefault "[self]"}} {::nsf::objectproperty metaclass $class} Object instproc ismixin {class} { - expr {[::nsf::objectproperty $class class] && + expr {[::nsf::objectproperty class $class] && [my ::nsf::cmd::ObjectInfo::hasmixin $class]}} Object instproc istype {class} { - expr {[::nsf::objectproperty $class class] && + expr {[::nsf::objectproperty class $class] && [::nsf::dispatch [self] ::nsf::cmd::ObjectInfo::hastype $class]} } @@ -650,7 +650,7 @@ set kind [lindex $definition 2] set name [lindex $definition 3] } else { - set prefix [expr {[::nsf::objectproperty $obj class] ? "inst" : ""}] + set prefix [expr {[::nsf::objectproperty class $obj] ? "inst" : ""}] set kind $modifier set name [lindex $definition 2] } @@ -689,7 +689,7 @@ # support for XOTcl specific convenience routines Object instproc hasclass cl { - if {![::nsf::objectproperty $cl class]} {return 0} + if {![::nsf::objectproperty class $cl]} {return 0} if {[my ::nsf::cmd::ObjectInfo::hasmixin $cl]} {return 1} ::nsf::dispatch [self] ::nsf::cmd::ObjectInfo::hastype $cl } Index: tests/destroytest.tcl =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- tests/destroytest.tcl (.../destroytest.tcl) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ tests/destroytest.tcl (.../destroytest.tcl) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -381,8 +381,8 @@ ? "set ::firstDestroy" 0 "firstDestroy called" ? "set ::ObjectDestroy" 0 "ObjectDestroy called" ? {::nsf::isobject c1} 1 "object still exists in proc" - #? {::nsf::objectproperty ::C class} 0 "class still exists in proc" - ? {::nsf::objectproperty ::C class} 1 "class still exists in proc" + #? {::nsf::objectproperty class ::C} 0 "class still exists in proc" + ? {::nsf::objectproperty class ::C} 1 "class still exists in proc" } C create c1 c1 foo @@ -413,13 +413,13 @@ ? [:info class] ::C "object reclassed" #? [:info class] ::xotcl::Object "object reclassed" ? {::nsf::isobject ::C::c1} 1 "object still exists in proc" - ? {::nsf::objectproperty ::C class} 1 "class still exists in proc" + ? {::nsf::objectproperty class ::C} 1 "class still exists in proc" } C create ::C::c1 C::c1 foo #puts stderr ======[::nsf::isobject ::C::c1] ? {::nsf::isobject ::C::c1} 0 "object still exists after proc" -? {::nsf::objectproperty ::C class} 0 "class still exists after proc" +? {::nsf::objectproperty class ::C} 0 "class still exists after proc" ? "set ::firstDestroy" 1 "firstDestroy called" ? "set ::ObjectDestroy" 1 "ObjectDestroy called" @@ -532,12 +532,12 @@ # reuse the namespace for a class/object Class create ::module - ? {::nsf::objectproperty ::module class} 1 + ? {::nsf::objectproperty class ::module} 1 # delete the object/class ... and namespace ::module destroy - ? {::nsf::objectproperty ::module class} 0 + ? {::nsf::objectproperty class ::module} 0 } Test case namespace-import { @@ -551,24 +551,24 @@ Class create ::module { :create mod1 } - ? {::nsf::objectproperty ::module::Foo class} 1 - ? {::nsf::objectproperty ::module::foo class} 0 + ? {::nsf::objectproperty class ::module::Foo} 1 + ? {::nsf::objectproperty class ::module::foo} 0 ? {::nsf::isobject ::module::foo} 1 - ? {::nsf::objectproperty ::module class} 1 + ? {::nsf::objectproperty class ::module} 1 Object create ::o { :require namespace } namespace eval ::o {namespace import ::module::*} - ? {::nsf::objectproperty ::o::Foo class} 1 + ? {::nsf::objectproperty class ::o::Foo} 1 ? {::nsf::isobject ::o::foo} 1 # do not destroy namespace imported objects/classes ::o destroy - ? {::nsf::objectproperty ::o::Foo class} 0 + ? {::nsf::objectproperty class ::o::Foo} 0 ? {::nsf::isobject ::o::foo} 0 - ? {::nsf::objectproperty ::module::Foo class} 1 + ? {::nsf::objectproperty class ::module::Foo} 1 ? {::nsf::isobject ::module::foo} 1 ::module destroy Index: tests/object-system.tcl =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- tests/object-system.tcl (.../object-system.tcl) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ tests/object-system.tcl (.../object-system.tcl) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -17,57 +17,57 @@ } ? {::nsf::isobject Object} 1 -? {::nsf::objectproperty Object class} 1 -? {::nsf::objectproperty Object metaclass} 0 +? {::nsf::objectproperty class Object} 1 +? {::nsf::objectproperty metaclass Object} 0 ? {Object info superclass} "" ? {Object info class} ::nx::Class ? {::nsf::isobject Class} 1 -? {::nsf::objectproperty Class class} 1 -? {::nsf::objectproperty Class metaclass} 1 +? {::nsf::objectproperty class Class} 1 +? {::nsf::objectproperty metaclass Class} 1 ? {Class info superclass} ::nx::Object ? {Class info class} ::nx::Class Object create o ? {::nsf::isobject Object} 1 -? {::nsf::objectproperty o class} 0 -? {::nsf::objectproperty o metaclass} 0 +? {::nsf::objectproperty class o} 0 +? {::nsf::objectproperty metaclass o} 0 ? {o info class} ::nx::Object ? {Object info instances o} ::o ? {Object info instances ::o} ::o Class create C0 -? {::nsf::objectproperty C0 class} 1 -? {::nsf::objectproperty C0 metaclass} 0 +? {::nsf::objectproperty class C0} 1 +? {::nsf::objectproperty metaclass C0} 0 ? {C0 info superclass} ::nx::Object ? {C0 info class} ::nx::Class #? {lsort [Class info vars]} "__default_metaclass __default_superclass" Class create M -superclass ::nx::Class ? {::nsf::isobject M} 1 -? {::nsf::objectproperty M class} 1 -? {::nsf::objectproperty M metaclass} 1 +? {::nsf::objectproperty class M} 1 +? {::nsf::objectproperty metaclass M} 1 ? {M info superclass} ::nx::Class ? {M info class} ::nx::Class M create C ? {::nsf::isobject C} 1 -? {::nsf::objectproperty C class} 1 -? {::nsf::objectproperty C metaclass} 0 +? {::nsf::objectproperty class C} 1 +? {::nsf::objectproperty metaclass C} 0 ? {C info superclass} ::nx::Object ? {C info class} ::M C create c1 ? {::nsf::isobject c1} 1 -? {::nsf::objectproperty c1 class} 0 -? {::nsf::objectproperty c1 metaclass} 0 +? {::nsf::objectproperty class c1} 0 +? {::nsf::objectproperty metaclass c1} 0 ? {c1 info class} ::C Class create M2 -superclass M ? {::nsf::isobject M2} 1 -? {::nsf::objectproperty M2 class} 1 -? {::nsf::objectproperty M2 metaclass} 1 +? {::nsf::objectproperty class M2} 1 +? {::nsf::objectproperty metaclass M2} 1 ? {M2 info superclass} ::M ? {M2 info class} ::nx::Class @@ -79,22 +79,23 @@ # meta-class and set subclass of M to the root meta-class M destroy ? {::nsf::isobject C} 1 -? {::nsf::objectproperty C class} 1 -? {::nsf::objectproperty C metaclass} 0 +? {::nsf::objectproperty class C} 1 +? {::nsf::objectproperty metaclass C} 0 ? {C info superclass} ::nx::Object ? {C info class} ::nx::Class -? {::nsf::objectproperty M2 metaclass} 1 +? {::nsf::objectproperty metaclass M2} 1 ? {M2 info superclass} ::nx::Class ? {m2 info superclass} ::nx::Object ? {m2 info class} ::M2 # destroy class M, reclass class instances to the base class C destroy -? {::nsf::objectproperty c1 objec} 1 -? {::nsf::objectproperty c1 class} 0 -? {::nsf::objectproperty c1 metaclass} 0 +? {::nsf::isobject c1} 1 +? {::nsf::objectproperty object c1} 1 +? {::nsf::objectproperty class c1} 0 +? {::nsf::objectproperty metaclass c1} 0 ? {c1 info class} ::nx::Object # basic parameter tests @@ -147,14 +148,14 @@ ::nsf::createobjectsystem ::object ::class ? {::nsf::isobject ::object} 1 -? {::nsf::objectproperty ::object class} 1 -? {::nsf::objectproperty ::object metaclass} 0 +? {::nsf::objectproperty class ::object} 1 +? {::nsf::objectproperty metaclass ::object} 0 ? {::nsf::relation ::object class} ::class ? {::nsf::relation ::object superclass} "" ? {::nsf::isobject ::class} 1 -? {::nsf::objectproperty ::class class} 1 -? {::nsf::objectproperty ::class metaclass} 1 +? {::nsf::objectproperty class ::class} 1 +? {::nsf::objectproperty metaclass ::class} 1 ? {::nsf::relation ::class class} ::class ? {::nsf::relation ::class superclass} ::object @@ -166,34 +167,34 @@ ::class + C ? {::nsf::isobject ::C} 1 -? {::nsf::objectproperty ::C class} 1 -? {::nsf::objectproperty ::C metaclass} 0 +? {::nsf::objectproperty class ::C} 1 +? {::nsf::objectproperty metaclass ::C} 0 ? {::nsf::relation ::C class} ::class ? {::nsf::relation ::C superclass} ::object # create an instance of C C + c1 ? {::nsf::isobject ::c1} 1 -? {::nsf::objectproperty ::c1 class} 0 -? {::nsf::objectproperty ::c1 metaclass} 0 +? {::nsf::objectproperty class ::c1} 0 +? {::nsf::objectproperty metaclass ::c1} 0 ? {::nsf::relation ::c1 class} ::C # destroy instance and class c1 - ? {::nsf::isobject ::c1} 0 -? {::nsf::objectproperty ::C class} 1 +? {::nsf::objectproperty class ::C} 1 C - -? {::nsf::objectproperty ::C class} 0 +? {::nsf::objectproperty class ::C} 0 ::nx::Class create ::C -? {catch {::nsf::objectproperty ::C type ::UNKNOWN}} 1 +? {catch {::nsf::objectproperty type ::C ::UNKNOWN}} 1 ? {catch {::C info is type ::xyz::Bar}} 1 -? {catch {::nsf::objectproperty ::CCCC type ::nx::Object}} 1 +? {catch {::nsf::objectproperty type ::CCCC ::nx::Object}} 1 ::C destroy Index: tests/parameters.tcl =================================================================== diff -u -r1008a85cf8fe5d95365568f6c765a83389028ff2 -r3754364287df2dfdf79b81dfa69224eae19cf691 --- tests/parameters.tcl (.../parameters.tcl) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) +++ tests/parameters.tcl (.../parameters.tcl) (revision 3754364287df2dfdf79b81dfa69224eae19cf691) @@ -39,7 +39,7 @@ ? {::nsf::isobject o1} 1 ? {::nsf::isobject o1000} 0 - #? {::nsf::objectproperty c1 type C} 1 + #? {::nsf::objectproperty type c1 C} 1 ? {c1 info has type C} 1 ? {c1 info has type C1} {expected class but got "C1" for parameter class} #? {::nsf::is c1 object -type C} 1