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.93.2.39 -r1.93.2.40 --- openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 29 Jul 2021 12:33:57 -0000 1.93.2.39 +++ openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 29 Jul 2021 12:35:46 -0000 1.93.2.40 @@ -84,6 +84,18 @@ return -code error "Value '$value' of parameter $name is not a natural number." } } + :method type=object_id {name value} { + # + # Object ID has SQL integers, which have a different value range + # than Tcl integers. SQL integers are classical 32-bit quantities. + # + if {![string is integer -strict $value] + || $value < -2147483648 + || $value > 2147483647 + } { + return -code error "Value '$value' of parameter $name is not a valid object ID." + } + } :method type=token {name value} { if {![regexp {^[\w.,: -]+$} $value]} { return -code error "Value '$value' of parameter $name is not a valid token." @@ -117,6 +129,7 @@ ::nx::Slot method exists ::nx::Slot method set ::nx::Slot method type=naturalnum + ::nx::Slot method type=object_id ::nx::Slot method type=token ::nx::Slot method type=localurl ::nx::Slot method type=html