Index: openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl,v diff -u -r1.78.2.32 -r1.78.2.33 --- openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 30 Jun 2017 18:16:37 -0000 1.78.2.32 +++ openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 2 Jul 2017 21:32:15 -0000 1.78.2.33 @@ -74,6 +74,13 @@ ::nx::Object method qn {query_name} { return "dbqd.[:uplevel [list current class]]-[:uplevel [list current method]].$query_name" } + # allow the use of naturalnum with ::xowiki::Package initialize + ::nx::Slot method type=naturalnum {name value} { + if {![string is integer -strict $value] || $value < 0 } { + return -code error "Value '$value' of parameter $name is not a natural number." + } + } + ::xotcl::Object proc setExitHandler {code} {::nsf::exithandler set $code} ::xotcl::Object instproc set_instance_vars_defaults {} {:configure} @@ -84,6 +91,7 @@ ::nx::Slot method istype ::nx::Slot method exists ::nx::Slot method set + ::nx::Slot method type=naturalnum ::nx::Object nsfproc ::nsf::debug::call ::nx::Object nsfproc ::nsf::debug::exit } @@ -993,14 +1001,6 @@ my set db_slot($name) $newSlot } -# allow the use of naturalnum with ::xowiki::Package initialize -if {[info commands ::nx::methodParameterSlot] ne ""} { - ::nx::methodParameterSlot object method type=naturalnum {name value} { - if {![string is integer $value] || $value < 0 } { - return -code error "Value '$value' of parameter $name is not a natural number." - } - } -} #ns_log notice "*** FREECONN? [ns_ictl gettraces freeconn]" #ns_ictl trace freeconn {ns_log notice "*** FREECONN isconnected=[ns_conn isconnected]"}