Dear XOTcl/NSF community,
in order to contrain the input of certain methods to allow only objects of a certain type/class, e.g.:
Utility proc get_object_id_from_sourced_guid { -sourced_guid:sourced_guid } { ... }
we have the following code in our code base:
if {[info command ::xotcl::nonposArgs] ne ""} { ::xotcl::nonposArgs proc sourced_guid args { if {[llength $args] < 2} return foreach {name value} $args break if {![::xotcl::Object isobject $value]} {error "'$value' is not an object"} if {![$value istype ::foo::bar::SourcedGuid]} {error "'$value' is not of type SourcedGuid but [$value info class]"} } ::Serializer exportMethods { ::xotcl::nonposArgs proc sourced_guid } }
This works with XOTcl 1.6, but we now see the following warnings when running the code under NSF:
Warning: nsf: Could not find value checker type=sourced_guid defined on ::nx::methodParameterSlot
What is the correct way to port this to XOTcl 2.0?
Thank you for your help! Michael