Index: library/lib/doc-tools.tcl =================================================================== diff -u -r8aaec98df564488dc8540cd078d6a32dd55a08f7 -r79287f596cc2c14ecd2b788d217699e2baeb050d --- library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision 8aaec98df564488dc8540cd078d6a32dd55a08f7) +++ library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision 79287f596cc2c14ecd2b788d217699e2baeb050d) @@ -234,7 +234,9 @@ # # @param qualified_name The fully qualified name (i.e., including the root namespace) :method get_unqualified_name {qualified_name} { - return [string trim [string map [list [:root_namespace] ""] $qualified_name] ":"] + # TODO: danger, tcl-commands in comments + # similar to \[namespace tail], but the "tail" might be an object with a namespace + return [string trimleft [string map [list [:root_namespace] ""] $qualified_name] ":"] } } @@ -351,7 +353,13 @@ :attribute @doc:multivalued {set :incremental 1} :attribute @see -slotclass ::nx::doc::PartAttribute + :attribute @properties -slotclass ::nx::doc::PartAttribute + :method has_property {prop} { + if {![info exists :@properties]} {return 0} + expr {$prop in ${:@properties}} + } + # @method _doc # # The method _doc can be use to obtain the value of the documentation @@ -621,7 +629,7 @@ } } if {1} { - # TODO: make me conditional + # TODO: make me conditional, MARKUP should be in templates set object [${:partof} name] if {[::nx::core::objectproperty $object object]} { if {[$object info methods ${:name}] ne ""} { @@ -636,7 +644,7 @@ } else { set comment "actual parameter: $actualParams" } - append comment "
Syntax: [$object info method parametersyntax ${:name}]" + append comment "
Syntax: obj ${:name} [$object info method parametersyntax ${:name}]" } } else { set comment "Method '${:name}' not defined on $object" @@ -669,12 +677,11 @@ # command parameters. # # @superclass ::nx::doc::entities::object::nx::doc::Part - # @superclass ::nx::doc::entities::object::nx::doc::Part PartClass create @param \ -superclass Part { :attribute spec :attribute default - + :object method id {partof name} { # The method contains the parameter-specific name production rules. #