SelectionInListView.st
changeset 587 19deffec383d
parent 586 032b3245e53a
child 594 b9c5a5e5f905
equal deleted inserted replaced
586:032b3245e53a 587:19deffec383d
  2087 	]
  2087 	]
  2088     ]
  2088     ]
  2089 !
  2089 !
  2090 
  2090 
  2091 getListFromModel
  2091 getListFromModel
  2092     "if I have a model and a listMsg, get my list from it"
  2092     "if I have a model, get my list from it using the listMessage.
  2093 
  2093      If listMessage is nil, try aspectMessage for backward compatibilty."
  2094     |text|
  2094 
       
  2095     |text msg|
  2095 
  2096 
  2096     model notNil ifTrue:[
  2097     model notNil ifTrue:[
  2097 	listMsg notNil ifTrue:[
  2098         msg := listMsg.
  2098 	    items := model perform:listMsg.
  2099         msg isNil ifTrue:[
  2099 	    items notNil ifTrue:[
  2100             msg := aspectMsg
  2100 		printItems ifTrue:[
  2101         ].
  2101 		    text := items collect:[:element | element printString]
  2102 
  2102 		] ifFalse:[
  2103         listMsg notNil ifTrue:[
  2103 		    text := items
  2104             items := model perform:msg.
  2104 		].
  2105             items notNil ifTrue:[
       
  2106                 printItems ifTrue:[
       
  2107                     text := items collect:[:element | element printString]
       
  2108                 ] ifFalse:[
       
  2109                     text := items
       
  2110                 ].
  2105 "/                text notNil ifTrue:[
  2111 "/                text notNil ifTrue:[
  2106 "/                    text := text asStringCollection.
  2112 "/                    text := text asStringCollection.
  2107 "/                ]
  2113 "/                ]
  2108 	    ].
  2114             ].
  2109 	    self list:text keepSelection:true. "/ expandTabs:false
  2115             self list:text keepSelection:true. "/ expandTabs:false
  2110 	].
  2116         ].
  2111     ].
  2117     ].
       
  2118 
       
  2119     "Modified: 26.4.1996 / 14:09:04 / cg"
  2112 !
  2120 !
  2113 
  2121 
  2114 getSelectionFromModel
  2122 getSelectionFromModel
  2115     "if I have a model and an initialSelectionMsg, get my selection from it"
  2123     "if I have a model and an initialSelectionMsg, get my selection from it"
  2116 
  2124 
  2721 ! !
  2729 ! !
  2722 
  2730 
  2723 !SelectionInListView class methodsFor:'documentation'!
  2731 !SelectionInListView class methodsFor:'documentation'!
  2724 
  2732 
  2725 version
  2733 version
  2726     ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.65 1996-04-25 17:33:40 cg Exp $'
  2734     ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.66 1996-04-26 13:56:21 cg Exp $'
  2727 ! !
  2735 ! !