ListView.st
changeset 2322 7d8f3c26a047
parent 2316 c259fe3a937b
child 2325 3d0f2d7f69d9
equal deleted inserted replaced
2321:e1fa2ff7d945 2322:7d8f3c26a047
  1371 ! !
  1371 ! !
  1372 
  1372 
  1373 !ListView methodsFor:'change & update'!
  1373 !ListView methodsFor:'change & update'!
  1374 
  1374 
  1375 update:something with:aParameter from:changedObject
  1375 update:something with:aParameter from:changedObject
       
  1376     |idx|
       
  1377 
  1376     changedObject == model ifTrue:[
  1378     changedObject == model ifTrue:[
       
  1379         model isList ifTrue:[
       
  1380             list ~~ model ifTrue:[
       
  1381                 something == #at: ifTrue:[
       
  1382                     idx := aParameter isCollection ifTrue:[aParameter at:1]
       
  1383                                                   ifFalse:[aParameter].
       
  1384                     ^ self at:aParameter put:(model at:idx).
       
  1385                 ].
       
  1386                 something == #insert: ifTrue:[
       
  1387                     ^ self add:(model at:aParameter) beforeIndex:aParameter
       
  1388                 ].
       
  1389                 something == #remove: ifTrue:[
       
  1390                     ^ self removeIndex:aParameter
       
  1391                 ].
       
  1392             ].
       
  1393             ^ self getListFromModel.
       
  1394         ].
       
  1395 
  1377         (aspectMsg notNil
  1396         (aspectMsg notNil
  1378         and:[something == aspectMsg]) ifTrue:[
  1397         and:[something == aspectMsg]) ifTrue:[
  1379             ^ self getListFromModel.
  1398             ^ self getListFromModel.
  1380         ].
  1399         ].
  1381 
  1400 
  4251 ! !
  4270 ! !
  4252 
  4271 
  4253 !ListView class methodsFor:'documentation'!
  4272 !ListView class methodsFor:'documentation'!
  4254 
  4273 
  4255 version
  4274 version
  4256     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.244 2000-11-22 12:20:33 cg Exp $'
  4275     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.245 2000-11-24 10:47:13 martin Exp $'
  4257 ! !
  4276 ! !