Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.121 -r1.122 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 12 Dec 2008 13:36:22 -0000 1.121 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 12 Dec 2008 19:03:58 -0000 1.122 @@ -1778,9 +1778,28 @@ error "no component named $component_name of compound field [my name]" } + CompoundField instproc exists_named_sub_component args { + # Iterate along the argument list to check components of a deeply + # nested structure. For example, + # + # my check_named_sub_component a b + # + # returns 0 or one depending whether there exists a component "a" + # with a subcomponent "b". + set component_name [my name] + set sub [self] + foreach e $args { + append component_name .$e + if {![info exists component_index($component_name)]} { + return 0 + } + } + return 1 + } + CompoundField instproc get_named_sub_component args { # Iterate along the argument list to get components of a deeply - # nested structure For example, + # nested structure. For example, # # my get_named_sub_component a b #