Index: TODO =================================================================== diff -u -N -rb337f38c9e541e733674aac902eddb0fe44c0164 -rea3bbe8b1039c45baa2c027c005151e04e57d4b1 --- TODO (.../TODO) (revision b337f38c9e541e733674aac902eddb0fe44c0164) +++ TODO (.../TODO) (revision ea3bbe8b1039c45baa2c027c005151e04e57d4b1) @@ -4524,6 +4524,9 @@ for consistencey with "nsf::my" and "nsf::dispatch" which uses "-system" as well +nx.tcl: +- removed "info is .." since it might raise more questions than it solves + ======================================================================== TODO: Index: doc/next-migration.html =================================================================== diff -u -N -r56f48a605e58baed9ed8d0f4d43cd704bf34811d -rea3bbe8b1039c45baa2c027c005151e04e57d4b1 --- doc/next-migration.html (.../next-migration.html) (revision 56f48a605e58baed9ed8d0f4d43cd704bf34811d) +++ doc/next-migration.html (.../next-migration.html) (revision ea3bbe8b1039c45baa2c027c005151e04e57d4b1) @@ -5307,8 +5307,12 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
# Check if object is a class
-/obj/ info is class
+
cd # Check if object is an NX class
+/obj/ has type ::nx::Class
+
+# Check if object is a class in one of the
+# NSF object systems
+::nsf::is class /obj/
@@ -5334,8 +5338,12 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
# Check if object is a metaclass
-/obj/ info is metaclass
+
# Check if class is an NX metaclass
+expr {[/cls/ info heritage ::nx::Class] ne ""}
+
+# Check if object is a metaclass in one of the
+# NSF object systems
+::nsf::is metaclass /obj/
@@ -5362,7 +5370,7 @@ .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
# Check if object is a baseclass of an object system
-/obj/ info is baseclass
+::nsf::is baseclass /obj/
@@ -6264,7 +6272,7 @@ Index: doc/next-migration.txt =================================================================== diff -u -N -r56f48a605e58baed9ed8d0f4d43cd704bf34811d -rea3bbe8b1039c45baa2c027c005151e04e57d4b1 --- doc/next-migration.txt (.../next-migration.txt) (revision 56f48a605e58baed9ed8d0f4d43cd704bf34811d) +++ doc/next-migration.txt (.../next-migration.txt) (revision ea3bbe8b1039c45baa2c027c005151e04e57d4b1) @@ -2485,17 +2485,25 @@ ---------------- |[source,tcl] ---------------- -# Check if object is a class -/obj/ info is class +cd # Check if object is an NX class +/obj/ has type ::nx::Class + +# Check if object is a class in one of the +# NSF object systems +::nsf::is class /obj/ ---------------- |[source,tcl] ---------------- /obj/ ismetaclass /cls/ ---------------- |[source,tcl] ---------------- -# Check if object is a metaclass -/obj/ info is metaclass +# Check if class is an NX metaclass +expr {[/cls/ info heritage ::nx::Class] ne ""} + +# Check if object is a metaclass in one of the +# NSF object systems +::nsf::is metaclass /obj/ ---------------- |[source,tcl] ---------------- @@ -2504,7 +2512,7 @@ |[source,tcl] ---------------- # Check if object is a baseclass of an object system -/obj/ info is baseclass +::nsf::is baseclass /obj/ ---------------- |[source,tcl] ---------------- Index: doc/tutorial2.html =================================================================== diff -u -N -rbe3ba45f303ed61511b034e73e0bba5d10d10982 -rea3bbe8b1039c45baa2c027c005151e04e57d4b1 --- doc/tutorial2.html (.../tutorial2.html) (revision be3ba45f303ed61511b034e73e0bba5d10d10982) +++ doc/tutorial2.html (.../tutorial2.html) (revision ea3bbe8b1039c45baa2c027c005151e04e57d4b1) @@ -609,7 +609,7 @@ # But we only remove matching playernames of type "Player". We do # not want to remove another club member type who has the same # name. - if{[$player info is type Player] && [$player name] eq $playername} { + if{[$player info has type Player] && [$player name] eq $playername} { # We simply 'move' the player object to the destination team. # Again we use a unique autoname in the new scope $player move ${destinationTeam}::[$destinationTeam autoname player%02d] @@ -629,7 +629,7 @@ SoccerTeam method printPlayers {} { puts "Players of ${:name}:" foreach m [:info children] { - if {[$m info is type Player]} {puts " [$m name]"} + if {[$m info has type Player]} {puts " [$m name]"} } } Index: library/lib/nxdoc-core.tcl =================================================================== diff -u -N -r5d1617640ad71fd52b069f81cfcadbe4cbb6f2a2 -rea3bbe8b1039c45baa2c027c005151e04e57d4b1 --- library/lib/nxdoc-core.tcl (.../nxdoc-core.tcl) (revision 5d1617640ad71fd52b069f81cfcadbe4cbb6f2a2) +++ library/lib/nxdoc-core.tcl (.../nxdoc-core.tcl) (revision ea3bbe8b1039c45baa2c027c005151e04e57d4b1) @@ -101,7 +101,7 @@ set base "${:prefix}::[namespace tail $mixin]" if {[::nsf::object::exists $base]} { set scope [expr {[$mixin scope] eq "object" && \ - [$base info is class]?"class":""}] + [$base info has type ::nx::Class]?"class":""}] dict lappend :active_mixins $base $mixin $base eval [list : -system {*}$scope mixin add $mixin] } @@ -112,7 +112,7 @@ dict for {base mixins} ${:active_mixins} { foreach m $mixins { set scope [expr {[$m scope] eq "object" && \ - [$base info is class]?"class":""}] + [$base info has type ::nx::Class]?"class":""}] $base {*}$scope mixin delete $m } } Index: library/lib/nxdoc-dc.tcl =================================================================== diff -u -N -rd79efb10b92ad2045196990af50bc042e60b88f4 -rea3bbe8b1039c45baa2c027c005151e04e57d4b1 --- library/lib/nxdoc-dc.tcl (.../nxdoc-dc.tcl) (revision d79efb10b92ad2045196990af50bc042e60b88f4) +++ library/lib/nxdoc-dc.tcl (.../nxdoc-dc.tcl) (revision ea3bbe8b1039c45baa2c027c005151e04e57d4b1) @@ -534,7 +534,7 @@ :property processed_section { :public method assign {domain prop value} { set current_entity [$domain current_entity] - set scope [expr {[$current_entity info is class]?"class":""}] + set scope [expr {[$current_entity info has type ::nx::Class]?"class":""}] if {[$domain eval [list info exists :$prop]] && [:get $domain $prop] in [$current_entity eval [list : -system {*}$scope info mixin classes]]} { $current_entity eval [list : -system {*}$scope mixin delete [:get $domain $prop]] } @@ -643,7 +643,7 @@ # ${:current_entity} {*}$scope mixin delete ${:processed_section} # } - set scope [expr {[${:current_entity} info is class]?"class":""}] + set scope [expr {[${:current_entity} info has type ::nx::Class]?"class":""}] set mixins [${:current_entity} {*}$scope info mixin classes] if {${:processed_section} in $mixins} { set idx [lsearch -exact $mixins ${:processed_section}] Index: library/nx/nx.tcl =================================================================== diff -u -N -rbca161db07ae2fe223f49b5aa5e44e7149cf9e67 -rea3bbe8b1039c45baa2c027c005151e04e57d4b1 --- library/nx/nx.tcl (.../nx.tcl) (revision bca161db07ae2fe223f49b5aa5e44e7149cf9e67) +++ library/nx/nx.tcl (.../nx.tcl) (revision ea3bbe8b1039c45baa2c027c005151e04e57d4b1) @@ -710,7 +710,7 @@ :alias "info has mixin" ::nsf::methods::object::info::hasmixin :alias "info has namespace" ::nsf::methods::object::info::hasnamespace :alias "info has type" ::nsf::methods::object::info::hastype - :alias "info is" ::nsf::methods::object::info::is + #:alias "info is" ::nsf::methods::object::info::is :alias "info name" ::nsf::methods::object::info::name :alias "info object filter guard" ::nsf::methods::object::info::filterguard :alias "info object filter methods" ::nsf::methods::object::info::filtermethods Index: tests/parameters.test =================================================================== diff -u -N -r9dd5024eae672704fae601972a3111ab221750e7 -rea3bbe8b1039c45baa2c027c005151e04e57d4b1 --- tests/parameters.test (.../parameters.test) (revision 9dd5024eae672704fae601972a3111ab221750e7) +++ tests/parameters.test (.../parameters.test) (revision ea3bbe8b1039c45baa2c027c005151e04e57d4b1) @@ -50,12 +50,12 @@ ? {::nsf::object::exists o1000} 0 ? {::nsf::is class C} 1 - ? {C info is class} 1 + ? {C info has type ::nx::Class} 1 ? {::nsf::is baseclass ::nx::Object} 1 - ? {::nx::Object info is baseclass} 1 + #? {::nx::Object info is baseclass} 1 ? {::nsf::is baseclass C} 0 - ? {C info is baseclass} 0 + #? {C info is baseclass} 0 ? {::nsf::is class ::nx::Object} 1 ? {::nsf::is ::nx::Object class} {invalid value constraints "::nx::Object"} Index: tests/plain-object-method.test =================================================================== diff -u -N -r98b60429d7f10bf637fa2cfa2bb88d4069e2445f -rea3bbe8b1039c45baa2c027c005151e04e57d4b1 --- tests/plain-object-method.test (.../plain-object-method.test) (revision 98b60429d7f10bf637fa2cfa2bb88d4069e2445f) +++ tests/plain-object-method.test (.../plain-object-method.test) (revision ea3bbe8b1039c45baa2c027c005151e04e57d4b1) @@ -11,7 +11,7 @@ ? {o filter f} "::o: unable to dispatch method 'filter'" ? {lsort [o info object methods]} "f" - ? {lsort [o info]} "valid submethods of ::o info: children class has info is lookup name object parameter parent precedence variable vars" + ? {lsort [o info]} "valid submethods of ::o info: children class has info lookup name object parameter parent precedence variable vars" } package require nx::plain-object-method @@ -37,5 +37,5 @@ ? {o info filter methods} "" ? {lsort [o info object methods]} "f foo" - ? {lsort [o info]} "valid submethods of ::o info: children class filter has info is lookup method methods mixin name object parameter parent precedence variable vars" + ? {lsort [o info]} "valid submethods of ::o info: children class filter has info lookup method methods mixin name object parameter parent precedence variable vars" } Index: tests/submethods.test =================================================================== diff -u -N -r98b60429d7f10bf637fa2cfa2bb88d4069e2445f -rea3bbe8b1039c45baa2c027c005151e04e57d4b1 --- tests/submethods.test (.../submethods.test) (revision 98b60429d7f10bf637fa2cfa2bb88d4069e2445f) +++ tests/submethods.test (.../submethods.test) (revision ea3bbe8b1039c45baa2c027c005151e04e57d4b1) @@ -229,7 +229,7 @@ # defaultcmd has to return also subcmds of other shadowed ensembles ? {lsort [o1 info has]} "valid submethods of ::o1 info has: mixin namespace something type" - ? {lsort [o1 info]} "valid submethods of ::o1 info: children class has info is lookup name object parameter parent precedence variable vars" + ? {lsort [o1 info]} "valid submethods of ::o1 info: children class has info lookup name object parameter parent precedence variable vars" # returning methodpath in ensemble ? {o1 info has something path} "info has something path"