WASelectionDateTable

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

WASelectionDateTable

recursive
Hi,

Has anyone got an example of how to use WASelectionDateTable. I'm stuck receiving the following error:

MessageNotUnderstood: receiver of "value:value:" is nil
UndefinedObject(Object)>>doesNotUnderstand: #value:value 
[] WASelectionDateTable>>renderCellForDate:row:index:on: 

Code is:

initialize
|start plus1 plus2 plus3|
super initialize.
plantable := WASelectionDateTable new. 
start := Date today.
plus1 := start addDays: 1.
plus2 := start addDays: 2.
plus3 := start addDays: 3.
plantable startDate: start.
plantable endDate: (start addDays: 3).
aCollection := Dictionary new.
aCollection add: start -> 'One';add:  plus1 -> 'Two'; add: plus2 -> 'Three'; add: plus3 -> 'Four';yourself. 
plantable rows: aCollection.


renderContentOn: html
html render: plantable

Thanks

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WASelectionDateTable

John McKeon
You need to supply a block [ :aRow :aDate | "some code using aDate and aRow" ] that returns the text to be rendered for the date/row. You supply it as the argument to rowsAndDatesDisplay: aBlock  which will store the block in the cellBlock instance variable.

On Tue, Jan 11, 2011 at 3:51 PM, <[hidden email]> wrote:
Hi,

Has anyone got an example of how to use WASelectionDateTable. I'm stuck receiving the following error:

MessageNotUnderstood: receiver of "value:value:" is nil
UndefinedObject(Object)>>doesNotUnderstand: #value:value 
[] WASelectionDateTable>>renderCellForDate:row:index:on: 

Code is:

initialize
|start plus1 plus2 plus3|
super initialize.
plantable := WASelectionDateTable new. 
start := Date today.
plus1 := start addDays: 1.
plus2 := start addDays: 2.
plus3 := start addDays: 3.
plantable startDate: start.
plantable endDate: (start addDays: 3).
aCollection := Dictionary new.
aCollection add: start -> 'One';add:  plus1 -> 'Two'; add: plus2 -> 'Three'; add: plus3 -> 'Four';yourself. 
plantable rows: aCollection.


renderContentOn: html
html render: plantable

Thanks

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
http://john-mckeon.us

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WASelectionDateTable

recursive
In reply to this post by recursive
Thanks, obvious when it's explained :)
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside