ListView.st
changeset 6575 f0d5fbcbace8
parent 6566 d6f3fa447336
child 6582 11f3c0f16d6b
equal deleted inserted replaced
6574:6c054f170606 6575:f0d5fbcbace8
   983 	final:lineEnd
   983 	final:lineEnd
   984 
   984 
   985     "Modified: / 04-07-2006 / 19:18:47 / fm"
   985     "Modified: / 04-07-2006 / 19:18:47 / fm"
   986 !
   986 !
   987 
   987 
   988 contents:something
   988 contents:aStringOrStringCollection
   989     "set the contents (either a String or a Collection of strings)
   989     "set the contents (either a String or a Collection of strings)
   990      also scroll to top. See #setContents:, which does not scroll.
   990      also scroll to top. See #setContents:, which does not scroll.
   991      If the argument is a string, it is converted
   991      If the argument is a string, it is converted
   992      to a collection of line-strings here."
   992      to a collection of line-strings here."
   993 
   993 
   994     |l|
   994     |listOfLines|
   995 
   995 
   996     l := something.
   996     listOfLines := aStringOrStringCollection.
   997     l notNil ifTrue:[
   997     listOfLines notNil ifTrue:[
   998 	l isString ifTrue:[
   998         listOfLines isString ifTrue:[
   999 	    l := l asStringCollection
   999             listOfLines := listOfLines asStringCollection.
  1000 	]
  1000         ]
  1001     ].
  1001     ].
  1002     self list:l
  1002     self list:listOfLines
  1003 
  1003 
  1004     "Modified: 5.6.1997 / 11:11:54 / cg"
  1004     "Modified: / 05-06-1997 / 11:11:54 / cg"
       
  1005     "Modified (comment): / 23-04-2019 / 20:37:54 / Claus Gittinger"
  1005 !
  1006 !
  1006 
  1007 
  1007 from:from to:to do:aBlock
  1008 from:from to:to do:aBlock
  1008     "evaluate aBlock on some of my lines"
  1009     "evaluate aBlock on some of my lines"
  1009 
  1010