Hi!
I have the main renderContentOn that calls renderCell
renderContentOn:html
html table: [
1 to: 10 do: [ :row |
html tableRow: [
1 to: 10 do: [ :col |
html tableData: [ self renderCell: row @ col on: html ] ] ] ] ] .
Each cell has a value, at first is zero, but if you submit the button, it
changes, and with this, here we have the point, it should change of colour
or stay with another if the value isn't changed. Now just show the value
renderCell: aPoint on: html
| value |
value := self model boardAt2: aPoint. "Method to extract the value of the
point in the array"
html submitButtonWithAction: [
value isZero ifTrue: [ bool := (self model checkValue: aPoint).
(bool == true) ifTrue: [ self model boardAt2: aPoint put: 1.
self answer: self model. ]
ifFalse: [ self inform: ' Error'. ] .
]
ifFalse: [ self inform: ' Error '. ] .
]
text: (value isZero
ifTrue: [ ' ' ]
ifFalse: [ value ] ) .
Somebody could help me??
Thanks in advance,
Rubén
_________________________________________________________________
Descubre la descarga digital con MSN Music. Más de un millón de canciones.
http://music.msn.es/