Water 5-User Interface-HTML LayoutContract| Return type | wob | | Parameter key | Default value | Type | | a_key | req | | a_value | req | | returns | "first" | string | | Water Contract<method get_with_value
a_key =req
a_value=req
returns="first"/> | |
get_with_value finds objects within _subject that have a field of the given key
whose value is the given value.
get_with_value walks the fields of _subject in a depth-first order.
a wob
| Parameter key | Default value | Type |
| returns | "first" | string |
a wobreturns="first"
"first" (the default) then the first object which has the key with the proper value
will be returned. If no such object is found, null is returned.
a wobreturns="last"
The last object which has the key with the proper value
will be returned. If no such object is found, null is returned.
a wobreturns="all"
A vector of all the objects which have the key with the proper value
will be returned.
Note that the _subject itself is the first object checked and if it matches, it
will be included in the result.
<thing deep=<thing weight=135/>/>.<get_with_value "weight" 135/>
 | <thing weight=135/>
|
<vector <thing material="cloth"/>
<thing weight=135 material="cotton"/>
<thing deep=<thing deeper=<vector 31
<thing weight=135 material="silver"/>
<thing weight=135 material="gold"/> />/>/>/>.
<get_with_value "weight" 135 returns="all"/> | <vector <thing material="cotton" weight=135/> <thing material="silver" weight=135/> <thing material="gold" weight=135/>/>
|
© Copyright 2007 Clear Methods, Inc.