Index: doc/Object.man =================================================================== diff -u -r28458dc55de6b9134e16623722f3fd5f2c109caf -rc4cb0af2d70fbb925613e396747d365823be5465 --- doc/Object.man (.../Object.man) (revision 28458dc55de6b9134e16623722f3fd5f2c109caf) +++ doc/Object.man (.../Object.man) (revision c4cb0af2d70fbb925613e396747d365823be5465) @@ -333,7 +333,14 @@ [list_end] +[cmd_def filter] +[list_begin definitions] + +[include filter.man.inc] + +[list_end] + [cmd_def forward] [list_begin definitions] @@ -563,15 +570,6 @@ [list_end] -[cmd_def filter] - -[list_begin definitions] - -[call [arg obj] [method {object filter}] ...] -[para] Description of [method {object filter}] ... -[list_end] - - [cmd_def mixin] [list_begin definitions] Index: doc/filter.man.inc =================================================================== diff -u --- doc/filter.man.inc (revision 0) +++ doc/filter.man.inc (revision c4cb0af2d70fbb925613e396747d365823be5465) @@ -0,0 +1,44 @@ +[comment {-*- tcl -*- manpage fragment for filter method, shared by nx::Object and nx::Class}] + +[keywords "method filter"] + +[call [arg obj] [const [vset SCOPE]] [method filter] [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 +[arg submethod]: + +[list_begin definitions] +[def "[arg obj] [const [vset SCOPE]] [method {filter set}] [arg filterSpecList]"] + +[arg filterSpecList] takes a list of [term "filter"] specs, with each spec being itself a +one- or three-elements list: [arg methodName] ?-guard [arg guardExpr]?. [arg methodName] identifies +an existing method of [arg obj] which becomes +registered as a filter. If having three elements, the third +element [arg guardExpr] will be stored as a guard expression of the +[term "filter"]. This guard expression will be evaluated using +[cmd expr] when [arg obj] receives a message to determine if the +filter applies. Guard expressions +allow for realizing context-dependent or conditional filter +composition. If [arg filterSpecList] represents an empty list, any +existing [term "filter"] will be removed from [arg obj]. + +[def "[arg obj] [const [vset SCOPE]] [method {filter get}]"] +Returns the current list of methods registered as [term "filter"]s. + +[def "[arg obj] [const [vset SCOPE]] [method {filter add}] [arg spec] [opt [arg index]]"] +Inserts a single [term "filter"] into the current list of [term "filter"]s of [arg obj]. Using [arg index], a position in the existing list of [term "filter"]s for inserting the new [term "filter"] can be set. If +omitted, [arg index] defaults to the list head (0). + +[def "[arg obj] [const [vset SCOPE]] [method {filter delete}] [option -nocomplain] [arg specPattern]"] +Removes a single [term "filter"] from a current list of [term "filter"]s of +[arg obj] whose spec matches [arg specPattern]. [arg specPattern] can +contain special matching chars (see [cmd "string match"]). [const [vset SCOPE]] [method "filter delete"] will +throw an error if there is no matching [term "filter"], unless +[option -nocomplain] is set. + +[list_end] +Every [arg methodName] in a [arg spec] must resolve to an existing method in +the scope of the [vset SCOPE]. To +access and to manipulate the list of [term "filter"]s of [arg obj], +[method cget]|[method configure] [option -[vset SCOPE]-filter] can also be used. \ No newline at end of file Index: doc/mixin.man.inc =================================================================== diff -u -r8c9e678520d2a2294eeb43858c969e397b9527a8 -rc4cb0af2d70fbb925613e396747d365823be5465 --- doc/mixin.man.inc (.../mixin.man.inc) (revision 8c9e678520d2a2294eeb43858c969e397b9527a8) +++ doc/mixin.man.inc (.../mixin.man.inc) (revision c4cb0af2d70fbb925613e396747d365823be5465) @@ -12,7 +12,7 @@ [def "[arg obj] [const [vset SCOPE]] [method {mixin set}] [arg mixinSpecList]"] [arg mixinSpecList] takes a list of [term "mixin class"] specs, with each spec being itself a -one- or two-element list: [arg className] ?-guard [arg guardExpr]?. If +one- or three-elements list: [arg className] ?-guard [arg guardExpr]?. If having one element, the element will be considered the [arg className] of the [term "mixin class"]. If having three elements, the third element [arg guardExpr] will be stored as a guard expression of the @@ -27,7 +27,8 @@ Returns the current list of [term "mixin class"]es. [def "[arg obj] [const [vset SCOPE]] [method {mixin 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 -omitted, [arg index] defaults to the list head (0). Therefore, by default, any added [term "mixin class"] takes precedence over previously added classes in the overall linearisation of [arg obj]. +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].}] [def "[arg obj] [const [vset SCOPE]] [method {mixin 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 "mixin delete"] will throw an error if there is no matching [term "mixin class"], unless [option -nocomplain] is set. [list_end]