SelectionInTree.st
changeset 1553 38d1274a3e2f
parent 1550 3f9efcb63b4e
child 1818 fe99c5c721e9
equal deleted inserted replaced
1552:e3ad6557a3c3 1553:38d1274a3e2f
   682 
   682 
   683 
   683 
   684 !
   684 !
   685 
   685 
   686 detectItem:aOneArgBlock
   686 detectItem:aOneArgBlock
   687     "detect an item the evaluation of the block returns true. The
   687     "detect an item the evaluation of the block returns true. 
   688      argument to the block is the item.
   688      The argument to the block is the item.
   689      This searches top-level items only.
   689      This searches top-level items only.
   690     "
   690     "
   691     root notNil ifTrue:[
   691     root notNil ifTrue:[
   692         ^ root detectChild:aOneArgBlock
   692         ^ root detectChild:aOneArgBlock
   693     ].
   693     ].
   695 
   695 
   696 
   696 
   697 !
   697 !
   698 
   698 
   699 detectItem:aTwoArgBlock arguments:aListOfArgs
   699 detectItem:aTwoArgBlock arguments:aListOfArgs
   700     "detect an item the evaluation of the block returns true. The
   700     "detect an item the evaluation of the block returns true. 
   701      first argument to the block is the item, the second argument
   701      The first argument to the block is the item, the second argument
   702      the value derived from the argument list at an index.
   702      the value derived from the argument list at level.
   703      This searches top-level items only.
   703      This recursively walks down the tree up to aListOfArgs size levels;
       
   704      i.e. if you pass (1 to:10) as aListOfArgs, the block will get the sub-level
       
   705      as second argument and stop the search after 10 levels.
   704     "
   706     "
   705 
   707 
   706     root notNil ifTrue:[
   708     root notNil ifTrue:[
   707         ^ root detectChild:aTwoArgBlock arguments:aListOfArgs index:1
   709         ^ root detectChild:aTwoArgBlock arguments:aListOfArgs
   708     ].
   710     ].
   709     ^ nil
   711     ^ nil
   710 
   712 
   711 
   713 
   712 ! !
   714 ! !
   910 ! !
   912 ! !
   911 
   913 
   912 !SelectionInTree class methodsFor:'documentation'!
   914 !SelectionInTree class methodsFor:'documentation'!
   913 
   915 
   914 version
   916 version
   915     ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTree.st,v 1.28 1999-09-22 09:23:42 cg Exp $'
   917     ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTree.st,v 1.29 1999-09-22 09:35:19 cg Exp $'
   916 ! !
   918 ! !