Hello, I have a question about Scripted Value Constraints.
I want to create new type check for UUID value, like this:
::nx::Slot method name=uuid {name value} { if {[regexp {([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})} $value] != 1} { error "Value '$value' of parameter $name is not UUID" } }
So the tutorial states: If the same checks are used in many places in the program, defining names for the value checker will be the better choice since it improves maintainability.
This part is kinda blurry for me, what does it means define a name? For example, how can I use for example:
nx::Class create myClass -superclass mySupaClass { :property {user:uuid,required} :property {client:object,required} :property {total 0}
bla bla bla
Thank you