Index: library/lib/doc-assets/@class.html.yuidoc =================================================================== diff -u -r77c371a2e4a1bd85367d11869de6e2dc9fac4771 -ra8ee84dcc2166b54f50c387df65fc6b94315f6e5 --- library/lib/doc-assets/@class.html.yuidoc (.../@class.html.yuidoc) (revision 77c371a2e4a1bd85367d11869de6e2dc9fac4771) +++ library/lib/doc-assets/@class.html.yuidoc (.../@class.html.yuidoc) (revision a8ee84dcc2166b54f50c387df65fc6b94315f6e5) @@ -24,7 +24,11 @@
[:as_text]
+[:? {[:pinfo exists validation]} { +[join [:pinfo get validation]] +}] + [:?var :@class-attribute { [:!let class_attrs [:!get -sortedby name -with name @class-attribute]]
Index: library/lib/doc-assets/@method.html.yuidoc =================================================================== diff -u -r77c371a2e4a1bd85367d11869de6e2dc9fac4771 -ra8ee84dcc2166b54f50c387df65fc6b94315f6e5 --- library/lib/doc-assets/@method.html.yuidoc (.../@method.html.yuidoc) (revision 77c371a2e4a1bd85367d11869de6e2dc9fac4771) +++ library/lib/doc-assets/@method.html.yuidoc (.../@method.html.yuidoc) (revision a8ee84dcc2166b54f50c387df65fc6b94315f6e5) @@ -28,7 +28,7 @@ [$param statusmark] [$param as_text] - [$param pinfo get -default "" validation] + [join [$param pinfo get -default "" validation]] [:? {[$param eval {info exists :default}]} {
Default Value: [$param default] @@ -46,7 +46,7 @@ [:? {[$ret eval {info exists :spec}] && [$ret spec] ne ""} {[$ret spec]}]
- [$ret pinfo get -default "" validation] + [join [$ret pinfo get -default "" validation]] [$ret as_text]
Index: library/lib/doc-assets/@object.html.yuidoc =================================================================== diff -u -r77c371a2e4a1bd85367d11869de6e2dc9fac4771 -ra8ee84dcc2166b54f50c387df65fc6b94315f6e5 --- library/lib/doc-assets/@object.html.yuidoc (.../@object.html.yuidoc) (revision 77c371a2e4a1bd85367d11869de6e2dc9fac4771) +++ library/lib/doc-assets/@object.html.yuidoc (.../@object.html.yuidoc) (revision a8ee84dcc2166b54f50c387df65fc6b94315f6e5) @@ -17,6 +17,10 @@ [:as_text]
+[:? {[:pinfo exists validation]} { +[join [:pinfo get validation]] +}] + [:?var :@object-attribute { [:!let obj_attrs [:!get -sortedby name -with name @object-attribute]]
Index: library/lib/doc-tools.tcl =================================================================== diff -u -r77c371a2e4a1bd85367d11869de6e2dc9fac4771 -ra8ee84dcc2166b54f50c387df65fc6b94315f6e5 --- library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision 77c371a2e4a1bd85367d11869de6e2dc9fac4771) +++ library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision a8ee84dcc2166b54f50c387df65fc6b94315f6e5) @@ -570,9 +570,14 @@ :public method "pinfo propagate" args { - :pinfo set {*}$args - set path [dict create {*}[:get_upward_path -attribute {set :name}]] - foreach p [dict keys $path] { + set path [dict create {*}[:get_upward_path \ + -attribute {set :name}]] + foreach p [lreverse [dict keys $path]] { + # + # For now, we disallow upstream propagation if the receiving + # entity is missing ... as this would be pointless ... + # + if {[$p pinfo get -default "extra" status] eq "missing"} break; $p pinfo set {*}$args } } @@ -1175,9 +1180,11 @@ return ::nsf::${scope}::[string trimleft [[:partof] name] :]::${:name} } + # @method->validate() :public method validate {} { set partof [:get_owning_partof] - if {[info exists :pdata] && [:pinfo get -default complete status] ne "missing"} { + if {[info exists :pdata] && + [:pinfo get -default complete status] ne "missing"} { # # Note: Some information on methods cannot be retrieved from # within the tracers as they might not be set local to the @@ -1188,8 +1195,7 @@ set prj [:current_project] set box [$prj sandbox] set obj [$partof name] - - #set mname [:get_combined name] + if {[:pinfo exists bundle handle]} { set handle [:pinfo get bundle handle] :pinfo set bundle redefine-protected [$box eval [list ::nsf::methodproperty $obj $handle redefine-protected]] @@ -1215,13 +1221,6 @@ $p pdata [lappend paraminfo status missing] } } - # if {[:pinfo exists bundle parameter]} { - # set actual_params [:pinfo get bundle parameter] - # if {$actual_params ne $params} { - # :pinfo propagate status mismatch - # :pinfo set validation "Parameter definition mismatch: $actual_params" - # } - # } if {![:pinfo exists bundle parametersyntax]} { :pinfo set bundle parametersyntax $params @@ -1232,8 +1231,9 @@ # upstream! next } else { - # the method is missing -> this makes the owning object a mismatch - ${:partof} pinfo propagate status mismatch + # To realise upward status propagation for submethods, use: + # ${:partof} pinfo propagate status mismatch + $partof pinfo propagate status mismatch } } @@ -1342,23 +1342,38 @@ } - + # @param->validate() :public method validate {} { # # TODO: For now, we escape from @param validaton on command # parameters. There is no equivalent to [info parameter] # available, so we would need to cook a substitute based on # the parametersyntax. Review later ... # - if {${:name} eq "__out__" && [${:partof} info has type ::nx::doc::@command]} return; - if {[info exists :pdata] && [:pinfo get -default complete status] ne "missing"} { + if {${:name} eq "__out__" && \ + [${:partof} info has type ::nx::doc::@command]} return; + # + # Here, we escape from any parameter verification for + # parameters on forwards & alias, as there is no basis for + # comparison! + # + if {[${:partof} info has type ::nx::doc::@method] && \ + [${:partof} pinfo get bundle type] in [list forward alias]} { + dict set :pdata status "" + return; + } + + if {[info exists :pdata] && \ + [:pinfo get -default complete status] ne "missing"} { + # valid for both object and method parameters set pspec [:pinfo get -default "" bundle spec] if {[info exists :spec] && \ ${:spec} ne $pspec} { :pinfo propagate status mismatch - :pinfo lappend validation "Specification mismatch. Expected: '${:spec}' Got: '$pspec'." + :pinfo lappend validation "Specification mismatch. Expected: \ + '${:spec}' Got: '$pspec'." } next } else { @@ -1822,10 +1837,10 @@ :public method statusmark {} { set cls "" set prj [:current_project] + set obj [:origin] if {[$prj is_validated]} { - if {[info exists :pdata]} { - set cls [expr {[dict exists ${:pdata} status]?\ - [dict get ${:pdata} status]:""}] + if {[$obj eval {info exists :pdata}]} { + set cls [$obj pinfo get -default "" status] } else { set cls "extra" } @@ -2148,9 +2163,13 @@ dict set hash access ${:@modifier} return $hash } - }; # NxDocRenderer::@method + }; # html::@method - }; # NxDocTemplating + # MixinLayer::Mixin create [current]::@param -superclass [current]::Entity { + # }; # html::@method + + + }; # html # # Provide a simple HTML renderer. For now, we make our life simple @@ -2414,7 +2433,6 @@ proc __trace_pkg {} { - #puts stderr ">>> INIT [package names]" # ::interp hide "" source ::proc ::source {path} { set ns [uplevel [list namespace current]] @@ -2786,7 +2804,10 @@ dict set bundle handle $handle dict set bundle handleinfo [::nx::doc::handleinfo $handle] dict set bundle type [::nsf::dispatch ${::nx::doc::rootns}::__Tracer ::nsf::methods::object::info::method type $handle] - + if {![catch {set psyn [::nsf::dispatch ${::nx::doc::rootns}::__Tracer ::nsf::methods::object::info::method parametersyntax $handle]} _]} { + dict set bundle parametersyntax $psyn + } + ::nx::doc::__at_register_command $handle \ ->cmdtype @method \ ->source [file normalize [info script]] \ @@ -3527,7 +3548,6 @@ # # 3) documentation processing # - #puts stderr ">>> CMDS [$box get_registered_commands]" # 3a) top-level processing foreach script $scripts { Index: library/nx/nx.nxd =================================================================== diff -u -re03b655a792c452a2c1a76d479732e3fbadd7093 -ra8ee84dcc2166b54f50c387df65fc6b94315f6e5 --- library/nx/nx.nxd (.../nx.nxd) (revision e03b655a792c452a2c1a76d479732e3fbadd7093) +++ library/nx/nx.nxd (.../nx.nxd) (revision a8ee84dcc2166b54f50c387df65fc6b94315f6e5) @@ -1048,3 +1048,4 @@ # @pretty_plural object initialisation scripts +# @object configure \ No newline at end of file