Index: doc/Object.man =================================================================== diff -u -rf8e79022a6358a42c082e1637a14bddaa3798e73 -r904ff24ee84cffe6fa24e00dc75bfe6872d18cf6 --- doc/Object.man (.../Object.man) (revision f8e79022a6358a42c082e1637a14bddaa3798e73) +++ doc/Object.man (.../Object.man) (revision 904ff24ee84cffe6fa24e00dc75bfe6872d18cf6) @@ -573,9 +573,6 @@ [call [arg obj] [method {object mixin}] ...] [para] Description of [method {object mixin}] ... -[call [arg obj] [method {object variable}] ...] -[para] Description of [method {object variable}] ... - [list_end] [cmd_def require] @@ -641,8 +638,42 @@ [list_end] + +[cmd_def variable] + +[list_begin definitions] + +[comment {::nx::Object variable ?-accessor /value/? ?-incremental? ?-class /value/? ?-configurable /boolean/? ?-initblock /value/? ?-nocomplain? /spec/ ?/defaultValue/?}] + +[call [arg obj] [const object] [method variable] [opt "[option -accessor] public | protected | private"] [opt [option -incremental]] [opt "[option -class] [arg className]"] [opt "[option -configurable] [arg trueFalse]"] [opt "[option -initblock] [arg script]"] [opt [option -nocomplain]] [arg spec] [opt [arg defaultValue]]] + +[include variable.man.inc] + +[para] + +By default, the [term variable] will ascertain that a +pre-existing and equally named object variable will not be overwritten +when defining the [term variable]. In case of a conflict, an error exception +is thrown: + +[example { +% Object create obj { set :x 1 } +::obj +% ::obj object variable x 2 +object ::obj has already an instance variable named 'x' +}] + +If the [term switch] [option -nocomplain] is on, this check is omitted (continuing the above example): + +[example { +% ::obj object variable -nocomplain x 2 +% ::obj eval {set :x} +2 +}] + [list_end] +[list_end] [section {Internally called Methods}]