Index: doc/Class.man =================================================================== diff -u -r50abe8cdfef208a333756e2e95b3450423b1608d -r54cdf1847245e3d6245a740808d1d6923fb78997 --- doc/Class.man (.../Class.man) (revision 50abe8cdfef208a333756e2e95b3450423b1608d) +++ doc/Class.man (.../Class.man) (revision 54cdf1847245e3d6245a740808d1d6923fb78997) @@ -284,44 +284,22 @@ [list_end] -[cmd_def require] - -[list_begin definitions] - -[include require.man.inc] - -[list_end] - [cmd_def property] [list_begin definitions] -[call [arg cls] [method property] [opt "[option -accessor] public | protected | private"] [opt "[option -configurable] [arg trueFalse]"] [opt [option -incremental]] [opt "[option -class] [arg className]"] [opt [option -nocomplain]] [arg spec] [opt [arg initBlock]]] +[call [arg cls] [method property] [opt "[option -accessor] public | protected | private"] [opt "[option -configurable] [arg trueFalse]"] [opt [option -incremental]] [opt "[option -class] [arg className]"] [arg spec] [opt [arg initBlock]]] [include property.man.inc] -[para] +[list_end] -By default, the [term property] will ascertain that no (potentially) -pre-existing and equally named object variable will be overwritten -when defining the property. In case of a conflict, an error exception -is thrown: +[cmd_def require] -[example { -% Object create obj { set :x 1 } -::obj -% ::obj object property {x 2} -object ::obj has already an instance variable named 'x' -}] +[list_begin definitions] -If the [term switch] [option -nocomplain] is on, this check is omitted (continuing the above example): +[include require.man.inc] -[example { -% ::obj object property -nocomplain {x 2} -% ::obj eval {set :x} -2 -}] - [list_end] [cmd_def variable] @@ -330,32 +308,10 @@ [comment {::nx::Object variable ?-accessor /value/? ?-incremental? ?-class /value/? ?-configurable /boolean/? ?-initblock /value/? ?-nocomplain? /spec/ ?/defaultValue/?}] -[call [arg cls] [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]]] +[call [arg cls] [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]"] [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] Index: doc/filter.man.inc =================================================================== diff -u -r496978cf0b0f707fb82cd16eba99b2e44497e9ed -r54cdf1847245e3d6245a740808d1d6923fb78997 --- doc/filter.man.inc (.../filter.man.inc) (revision 496978cf0b0f707fb82cd16eba99b2e44497e9ed) +++ doc/filter.man.inc (.../filter.man.inc) (revision 54cdf1847245e3d6245a740808d1d6923fb78997) @@ -5,7 +5,7 @@ [call [arg [vset CMD]] [const [vset MODIFIER]] [method filters] [arg submethod] [opt "[arg arg] ..."]] Accesses and modifies the list of methods which are registered as -[term "filter"]s with [arg obj] using a specific setter or getter +[term "filter"]s with [arg [vset CMD]] using a specific setter or getter [arg submethod]: [list_begin definitions] @@ -19,33 +19,33 @@ is equivalent to passing an empty list for [arg filterSpecList] to [const [vset SCOPE]] [method {filter set}]. -[def "[arg [vset CMD]] [const [vset MODIFIER]] [method {filters get}]"] -Returns the list of current [term "filter specification"]s registered for [vset CMD]. - [def "[arg [vset CMD]] [const [vset MODIFIER]] [method {filters delete}] [option -nocomplain] [arg specPattern]"] Removes a single [term "filter"] from the current list of [term "filter"]s of [arg [vset CMD]] whose spec matches [arg specPattern]. [arg specPattern] can contain special matching chars (see [cmd "string match"]). [const [vset SCOPE]] [method "filters delete"] will throw an error if there is no matching [term "filter"], unless [option -nocomplain] is set. +[para] + +If [arg expr] is omitted, returns the guard expression set on the +[term "filter"] [arg methodName] defined for [arg [vset CMD]]. If none +is available, an empty string will be returned. + +[def "[arg [vset CMD]] [const [vset MODIFIER]] [method {filters get}]"] +Returns the list of current [term "filter specification"]s registered for [vset CMD]. + [def "[arg [vset CMD]] [const [vset MODIFIER]] [method {filters guard}] [arg methodName] [opt [arg expr]]"] If [arg expr] is specified, registers a guard expression [arg expr] with a filter [arg methodName]. This requires that the filter [arg methodName] has been previously set using [const [vset MODIFIER]] [method {filters set}] or added using [const [vset MODIFIER]] [method {filters add}]. [arg expr] must be a valid Tcl expression (see [cmd expr]). An empty string for [arg expr] will clear the currently registered guard expression for filter [arg methodName]. -[para] - -If [arg expr] is omitted, returns the guard expression set on the -[term "filter"] [arg methodName] defined for [arg [vset CMD]]. If none -is available, an empty string will be returned. - [def "[arg [vset CMD]] [const [vset MODIFIER]] [method "filters methods"] [opt [arg pattern]]"] If [arg pattern] is omitted, returns all filter names which are -defined by [arg obj]. By specifying [arg pattern], the returned +defined by [arg [vset CMD]]. By specifying [arg pattern], the returned filters can be limited to those whose names match [arg patterns] (see [cmd "string match"]). Index: doc/forward.man.inc =================================================================== diff -u -re5ad7edaed3418723ed31bda80c8639df6b44a7e -r54cdf1847245e3d6245a740808d1d6923fb78997 --- doc/forward.man.inc (.../forward.man.inc) (revision e5ad7edaed3418723ed31bda80c8639df6b44a7e) +++ doc/forward.man.inc (.../forward.man.inc) (revision 54cdf1847245e3d6245a740808d1d6923fb78997) @@ -4,19 +4,26 @@ [keywords "forward method"] [keywords "debugging level"] -[call [arg [vset CMD]] [opt "public | protected | private"] [const [vset MODIFIER]] [method forward] [arg methodName] [opt "[option -prefix] [arg prefixName]"] [opt "[option -frame] [arg object]"] [opt "[option -returns] [arg valueChecker]"] [opt [option -verbose]] [arg target] [opt "[arg arg] ..."]] +[call [arg [vset CMD]] [opt "public | protected | private"] [const [vset MODIFIER]] [method forward] [arg methodName] [opt "[option -prefix] [arg prefixName]"] [opt "[option -frame] [arg object]"] [opt "[option -returns] [arg valueChecker]"] [opt [option -verbose]] [opt [arg target]] [opt "[arg arg] ..."]] Define a [term "forward method"] for the given [vset SCOPE]. The definition of a [term "forward method"] registers a predefined, but changeable list of forwarder arguments under the (forwarder) name [arg methodName]. Upon calling the [term "forward method"], the forwarder -arguments are evaluated as a Tcl command call. That is, [arg target] +arguments are evaluated as a Tcl command call. That is, if present, [arg target] is interpreted as a Tcl command (e.g., a Tcl [cmd proc] or an object) and the remainder of the forwarder arguments [arg arg] as arguments passed into this command. The actual method arguments to the invocation of the [term "forward method"] itself are appended to the list of forwarder arguments. +If [arg target] is omitted, the value of [arg methodName] is +implicitly set and used as [arg target]. This way, when providing a +fully-qualified Tcl command name as [arg methodName] without [arg target], the +unqualified [arg methodName] ([cmd "namespace tail"]) is used as the +forwarder name; while the fully-qualified one serves as the [arg target]. + + [para] As for a regular [method "[vset MODIFIER] method"], [option "-returns"] allows Index: doc/info.man.inc =================================================================== diff -u -r496978cf0b0f707fb82cd16eba99b2e44497e9ed -r54cdf1847245e3d6245a740808d1d6923fb78997 --- doc/info.man.inc (.../info.man.inc) (revision 496978cf0b0f707fb82cd16eba99b2e44497e9ed) +++ doc/info.man.inc (.../info.man.inc) (revision 54cdf1847245e3d6245a740808d1d6923fb78997) @@ -22,7 +22,7 @@ [call [arg [vset CMD]] [method "info [vset MODIFIER] method"] [arg option] [arg methodName]] This introspection [term "submethod"] provides access to the details -of [arg methodName] provided by [arg obj]. Permitted values for +of [arg methodName] provided by [arg [vset CMD]]. Permitted values for [arg option] are: [list_begin itemized] @@ -34,9 +34,9 @@ [item] [const definition] returns a canonical command list which allows for (re-)define [arg methodName]. -[item] [const definitionhandle] returns the [term "method handle"] for a [term "submethod"] in a [term "method ensemble"] from the perspective of [arg obj] as method provider. [arg methodName] must contain a complete [term "method path"]. +[item] [const definitionhandle] returns the [term "method handle"] for a [term "submethod"] in a [term "method ensemble"] from the perspective of [arg [vset CMD]] as method provider. [arg methodName] must contain a complete [term "method path"]. -[item] [const exists] returns 1 if there is a [arg methodName] provided by [arg obj], returns 0 otherwise. +[item] [const exists] returns 1 if there is a [arg methodName] provided by [arg [vset CMD]], returns 0 otherwise. [item] [const handle] returns the [term "method handle"] for [arg methodName]. @@ -70,7 +70,7 @@ [call [arg [vset CMD]] [method "info [vset MODIFIER] methods"] [opt "[option -callprotection] [arg level]"] [opt "[option -type] [arg methodType]"] [opt [option -path]] [opt [arg namePattern]]] -Returns the names of all methods defined by [arg obj]. Methods covered +Returns the names of all methods defined by [arg [vset CMD]]. Methods covered include those defined using , [const [vset SCOPE]] [method alias], and [const [vset SCOPE]] [method forward]. The returned methods can be limited to those whose names match [arg namePattern] (see @@ -105,7 +105,7 @@ [call [arg [vset CMD]] [method "info [vset MODIFIER] slots"] [opt "[option -type] [arg className]"] [arg pattern]] -If [arg pattern] is not specified, returns the object names of all [term "slot object"]s defined by [arg obj]. The returned [term "slot object"]s can be limited according to any or a +If [arg pattern] is not specified, returns the object names of all [term "slot object"]s defined by [arg [vset CMD]]. The returned [term "slot object"]s can be limited according to any or a combination of the following criteria: First, [term "slot object"]s can be filtered based on their command names matching [arg namePattern] (see [cmd "string match"]). Second, [option "-type"] allows to select @@ -114,13 +114,13 @@ [call [arg [vset CMD]] [method "info [vset MODIFIER] variables"] [arg pattern]] If [arg pattern] is omitted, returns the object names of all [term "slot object"]s provided -by [arg obj] which are responsible for managing properties and variables of [arg obj]. Otherwise, +by [arg [vset CMD]] which are responsible for managing properties and variables of [arg [vset CMD]]. Otherwise, only [term "slot object"]s whose names match [arg pattern] are returned. [para] -This is equivalent to calling: [arg obj] [method "info [vset MODIFIER] slots"] -type ::nx::VariableSlot [opt [arg namePattern]]. +This is equivalent to calling: [arg [vset CMD]] [method "info [vset MODIFIER] slots"] -type ::nx::VariableSlot [opt [arg namePattern]]. [para] Index: doc/mixin.man.inc =================================================================== diff -u -r496978cf0b0f707fb82cd16eba99b2e44497e9ed -r54cdf1847245e3d6245a740808d1d6923fb78997 --- doc/mixin.man.inc (.../mixin.man.inc) (revision 496978cf0b0f707fb82cd16eba99b2e44497e9ed) +++ doc/mixin.man.inc (.../mixin.man.inc) (revision 54cdf1847245e3d6245a740808d1d6923fb78997) @@ -6,14 +6,14 @@ [call [arg [vset CMD]] [const [vset MODIFIER]] [method mixins] [arg submethod] [opt "[arg arg] ..."]] Accesses and modifies the list of [term "mixin class"]es of -[arg obj] using a specific setter or getter [arg submethod]: +[arg [vset CMD]] using a specific setter or getter [arg submethod]: [list_begin definitions] [def "[arg [vset CMD]] [const [vset MODIFIER]] [method {mixins add}] [arg spec] [opt [arg index]]"] -Inserts a single [term "mixin class"] into the current list of [term "mixin class"]es of [arg obj]. Using [arg index], a position in the existing list of [term "mixin class"]es for inserting the new [term "mixin class"] can be set. If +Inserts a single [term "mixin class"] into the current list of [term "mixin class"]es of [arg [vset CMD]]. Using [arg index], a position in the existing list of [term "mixin class"]es for inserting the new [term "mixin class"] can be set. If omitted, [arg index] defaults to the list head (0). -[comment {Therefore, by default, any added [term "mixin class"] takes precedence over previously added classes in the overall linearisation of [arg obj].}] +[comment {Therefore, by default, any added [term "mixin class"] takes precedence over previously added classes in the overall linearisation of [arg [vset CMD]].}] [def "[arg [vset CMD]] [const [vset MODIFIER]] [method "mixins classes"] [opt [arg pattern]]"] @@ -22,11 +22,11 @@ be limited to those whose names match [arg pattern] (see [cmd "string match"]). [def "[arg [vset CMD]] [const [vset MODIFIER]] [method {mixins clear}]"] -Removes all [term "mixin class"]es from [arg obj] and returns the list of removed [term "mixin class"]es. Clearing is equivalent to passing an empty list for [arg mixinSpecList] to +Removes all [term "mixin class"]es from [arg [vset CMD]] and returns the list of removed [term "mixin class"]es. Clearing is equivalent to passing an empty list for [arg mixinSpecList] to [const [vset MODIFIER]] [method {mixins set}]. [def "[arg [vset CMD]] [const [vset MODIFIER]] [method {mixins delete}] [option -nocomplain] [arg specPattern]"] -Removes a [term "mixin class"] from a current list of [term "mixin class"]es of [arg obj] whose spec matches [arg specPattern]. [arg specPattern] can contain special matching chars (see [cmd "string match"]). [const [vset SCOPE]] [method "mixins delete"] will throw an error if there is no matching [term "mixin class"], unless [option -nocomplain] is set. +Removes a [term "mixin class"] from a current list of [term "mixin class"]es of [arg [vset CMD]] whose spec matches [arg specPattern]. [arg specPattern] can contain special matching chars (see [cmd "string match"]). [const [vset SCOPE]] [method "mixins delete"] will throw an error if there is no matching [term "mixin class"], unless [option -nocomplain] is set. [def "[arg [vset CMD]] [const [vset MODIFIER]] [method {mixins get}]"] Returns the list of current [term "mixin specification"]s. @@ -49,7 +49,7 @@ of the [term "mixin class"]. If having three elements, the third element [arg guardExpr] will be stored as a guard expression of the [term "mixin class"]. This guard expression will be evaluated using -[cmd expr] when [arg obj] receives a message to determine if the mixin +[cmd expr] when [arg [vset CMD]] receives a message to determine if the mixin is to be considered during method dispatch or not. Guard expressions allow for realizing context-dependent or conditional mixin composition. @@ -59,10 +59,10 @@ A [term "mixin class"] whose spec is featured earlier in [arg mixinSpecList] takes precedence in the [term "linearisation"] over a [term "mixin class"] whose spec is listed later. The computed, - overall [term linearisation] of [arg obj] guarantees to maintain + overall [term linearisation] of [arg [vset CMD]] guarantees to maintain this local order of [term "mixin class"]es. }] At the time of setting the mixin relation, that is, calling [const [vset MODIFIER]] [method mixins], every [arg className] as part of a spec must be an existing instance of [cmd nx::Class]. To -access and to manipulate the list of [term "mixin class"]es of [arg obj], +access and to manipulate the list of [term "mixin class"]es of [arg [vset CMD]], [method cget]|[method configure] [option -[join [list {*}[vset MODIFIER] mixins] -]] can also be used. Index: doc/require.man.inc =================================================================== diff -u -re5ad7edaed3418723ed31bda80c8639df6b44a7e -r54cdf1847245e3d6245a740808d1d6923fb78997 --- doc/require.man.inc (.../require.man.inc) (revision e5ad7edaed3418723ed31bda80c8639df6b44a7e) +++ doc/require.man.inc (.../require.man.inc) (revision 54cdf1847245e3d6245a740808d1d6923fb78997) @@ -2,9 +2,9 @@ [keywords "call protection"] -[call [arg [vset CMD]] [opt "public | protected | private"] [method require] [const [vset MODIFIER]] [method method] [arg methodName]] +[call [arg [vset CMD]] [method require] [opt "public | protected | private"] [const [vset MODIFIER]] [method method] [arg methodName]] Attempts to register a method definition made available using [cmd ::nsf::method::provide] under -the name [arg methodName] with the object [arg obj] . The registered +the name [arg methodName] with [arg [vset CMD]] . The registered method is subjected to default [term "call protection"] ([const protected]), if not set explicitly.