Index: openacs-4/packages/xotcl-core/xotcl-core.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/xotcl-core.info,v
diff -u -r1.96 -r1.97
--- openacs-4/packages/xotcl-core/xotcl-core.info 22 Jan 2018 00:57:06 -0000 1.96
+++ openacs-4/packages/xotcl-core/xotcl-core.info 22 Jan 2018 18:38:43 -0000 1.97
@@ -10,7 +10,7 @@
t
xotcl
-
+
Gustaf Neumann
XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes)
2017-08-06
@@ -43,7 +43,7 @@
BSD-Style
2
-
+
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.85 -r1.86
--- openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 24 Dec 2017 12:28:07 -0000 1.85
+++ openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 22 Jan 2018 18:38:43 -0000 1.86
@@ -57,6 +57,7 @@
if {[info commands ::nx::Object] ne ""} {
ns_log notice "Defining minimal XOTcl 1 compatibility"
::nsf::method::alias ::xo::Attribute instvar ::nsf::methods::object::instvar
+
# provide compatibility with nsf 2.0b6, which has "-noinit" removed
::nx::ObjectParameterSlot create ::xo::Attribute::slot::noinit \
-methodname ::nsf::methods::object::noinit -noarg true
@@ -75,10 +76,17 @@
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."
+ ::nx::Slot eval {
+ :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."
+ }
}
+ :method type=token {name value} {
+ if {![regexp {^[\w.,: -]+$} $value]} {
+ return -code error "Value '$value' of parameter $name is not a valid token."
+ }
+ }
}
::xotcl::Object proc setExitHandler {code} {::nsf::exithandler set $code}
@@ -92,6 +100,7 @@
::nx::Slot method exists
::nx::Slot method set
::nx::Slot method type=naturalnum
+ ::nx::Slot method type=token
::nx::Object nsfproc ::nsf::debug::call
::nx::Object nsfproc ::nsf::debug::exit
}