Index: generic/predefined.h =================================================================== diff -u -rf0f0b5422a37c8d05f6b835de37fda6bb7347dfd -rdaafc0f0261f6b47a01c7cc8975acdd66f91f360 --- generic/predefined.h (.../predefined.h) (revision f0f0b5422a37c8d05f6b835de37fda6bb7347dfd) +++ generic/predefined.h (.../predefined.h) (revision daafc0f0261f6b47a01c7cc8975acdd66f91f360) @@ -21,7 +21,7 @@ "namespace import ::nx::core::next ::nx::core::self\n" "foreach cmd [info command ::nx::core::cmd::Object::*] {\n" "set cmdName [namespace tail $cmd]\n" -"if {$cmdName in [list \"instvar\"]} continue\n" +"if {$cmdName in [list \"exists\" \"instvar\"]} continue\n" "::nx::core::alias Object $cmdName $cmd}\n" "::nx::core::alias Object eval -nonleaf ::eval\n" "foreach cmd [info command ::nx::core::cmd::Class::*] {\n" @@ -160,7 +160,8 @@ "if {![::nx::core::objectproperty ${slotParent} object]} {\n" "::nx::Object create ${slotParent}}\n" "return ${slotParent}::$name}\n" -"::nx::MetaSlot method createFromParameterSyntax {target -per-object:switch\n" +"::nx::MetaSlot method createFromParameterSyntax {\n" +"target -per-object:switch\n" "{-initblock \"\"}\n" "value default:optional} {\n" "set opts [list]\n" @@ -207,7 +208,7 @@ "if {[llength $att]>1} {foreach {att default} $att break}\n" "if {[info exists default]} {\n" "foreach i [::nx::core::cmd::ClassInfo::instances $class] {\n" -"if {![$i exists $att]} {\n" +"if {![::nx::core::existsvar $i $att]} {\n" "if {[string match {*\\[*\\]*} $default]} {\n" "set value [::nx::core::dispatch $i -objscope ::eval subst $default]} else {\n" "set value $default}\n" @@ -232,7 +233,7 @@ "::nx::ObjectParameterSlot public method add {obj prop value {pos 0}} {\n" "if {![set :multivalued]} {\n" "error \"Property $prop of [set :domain]->$obj ist not multivalued\"}\n" -"if {[$obj exists $prop]} {\n" +"if {[::nx::core::existsvar $obj $prop]} {\n" "::nx::core::setvar $obj $prop [linsert [::nx::core::setvar $obj $prop] $pos $value]} else {\n" "::nx::core::setvar $obj $prop [list $value]}}\n" "::nx::ObjectParameterSlot public method delete {-nocomplain:switch obj prop value} {\n" @@ -382,6 +383,7 @@ "::nx::core::register_system_slots ::nx\n" "proc ::nx::core::register_system_slots {} {}\n" "::nx::MetaSlot __invalidateobjectparameter\n" +"# @param incremental Allows for using the fine-grained modification (i.e., setting) of the managed variable {e.g., through an incremental {{{add}}})\n" "::nx::MetaSlot create ::nx::Attribute -superclass ::nx::ObjectParameterSlot\n" "createBootstrapAttributeSlots ::nx::Attribute {\n" "{value_check once}\n" @@ -400,9 +402,9 @@ "::nx::Attribute protected method init {} {\n" "::nx::core::next ;# do first ordinary slot initialization\n" "set __initcmd \"\"\n" -"if {[:exists default]} {} elseif [:exists initcmd] {\n" +"if {[info exists :default]} {} elseif [info exists :initcmd] {\n" "append __initcmd \":trace add variable [list ${:name}] read \\\n" -"\\[list [::nx::core::current object] __default_from_cmd \\[::nx::core::current object\\] [list [set :initcmd]]\\]\\n\"} elseif [:exists valuecmd] {\n" +"\\[list [::nx::core::current object] __default_from_cmd \\[::nx::core::current object\\] [list [set :initcmd]]\\]\\n\"} elseif [info exists :valuecmd] {\n" "append __initcmd \":trace add variable [list ${:name}] read \\\n" "\\[list [::nx::core::current object] __value_from_cmd \\[::nx::core::current object\\] [list [set :valuecmd]]\\]\"}\n" "array set \"\" [:toParameterSyntax ${:name}]\n" @@ -414,7 +416,7 @@ "::nx::core::next}} else {\n" ":method assign [list obj var value:$(mparam),slot=[::nx::core::current object]] {\n" "::nx::core::setvar $obj $var $value}}}\n" -"if {[:exists valuechangedcmd]} {\n" +"if {[info exists :valuechangedcmd]} {\n" "append __initcmd \":trace add variable [list ${:name}] write \\\n" "\\[list [::nx::core::current object] __value_changed_cmd \\[::nx::core::current object\\] [list [set :valuechangedcmd]]\\]\"}\n" "if {$__initcmd ne \"\"} {\n"