DSVColumnView.st
changeset 1673 67898506ba03
parent 1668 085f5ee84f9b
child 1711 97e1fd579b89
equal deleted inserted replaced
1672:31dcb579f88a 1673:67898506ba03
  1271 !
  1271 !
  1272 
  1272 
  1273 update:what with:aPara from:chgObj
  1273 update:what with:aPara from:chgObj
  1274     "one of my rows/cells changed its value
  1274     "one of my rows/cells changed its value
  1275     "
  1275     "
  1276     |row newValue realValue list arg1 arg2|
  1276     |row newValue realValue list arg1 arg2 col idx|
  1277 
  1277 
  1278     chgObj == columnHolder ifTrue:[
  1278     chgObj == columnHolder ifTrue:[
  1279         ^ self columnDescriptors:(columnHolder value)
  1279         ^ self columnDescriptors:(columnHolder value)
  1280     ].
  1280     ].
  1281 
  1281         
  1282     chgObj == editValue ifTrue:[
  1282     chgObj == editValue ifTrue:[
  1283         newValue := editValue value.
  1283         newValue := editValue value.
  1284         self selectedColumn at:(self firstIndexSelected) put:newValue.
  1284         col := self selectedColumn.
  1285         realValue := self selectedColumn at:(self firstIndexSelected).
  1285         idx := self firstIndexSelected.
  1286         realValue ~= newValue ifTrue:[
  1286 
       
  1287         col at:idx put:newValue.
       
  1288         realValue := col at:idx.
       
  1289 
       
  1290         "/ !!!! editValue could be changed before set !!!! therefore: chgObj == editValue
       
  1291 
       
  1292         (chgObj == editValue and:[realValue ~= newValue]) ifTrue:[
  1287             "/ some validation by the row-object; the stored value
  1293             "/ some validation by the row-object; the stored value
  1288             "/ is different from what I think.
  1294             "/ is different from what I think.
  1289             "/ update my input fields modelValue
  1295             "/ update my input fields modelValue
  1290             editValue value:realValue.
  1296             editValue value:realValue.
  1291         ].
  1297         ].
       
  1298 
  1292         modifiedChannel notNil ifTrue:[
  1299         modifiedChannel notNil ifTrue:[
  1293             modifiedChannel value:true.
  1300             modifiedChannel value:true.
  1294         ].
  1301         ].
  1295         ^ self
  1302         ^ self
  1296     ].
  1303     ].
  3319 ! !
  3326 ! !
  3320 
  3327 
  3321 !DSVColumnView class methodsFor:'documentation'!
  3328 !DSVColumnView class methodsFor:'documentation'!
  3322 
  3329 
  3323 version
  3330 version
  3324     ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.99 2000-02-02 09:32:16 ca Exp $'
  3331     ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.100 2000-02-03 12:09:32 ca Exp $'
  3325 ! !
  3332 ! !