[Seaside] Using Magritte Reports in Seaside
Sau Sheong Chang
cssheong at pacific.net.sg
Wed Apr 25 04:05:38 UTC 2007
(Sorry forgot the subject)
Hi
I was playing around with the Magritte exercises and was going
through the Magritte solutions. I was trying to use Magritte Reports
and I hit some problems in Exercise 14 (adding a column to the
report). I didn't exactly follow the exercises as I instantiated the
report object on first call instead of doing it on initialization.
This is my code:
UserComponent>>report
^ report
ifNil: [report := MAReport
rows: self class users
description: (User description
select: [:each | #(#userName #firstName #lastName ) includes:
each accessor selector]).
report addColumn: (MACommandColumn new addCommandOn: self
selector: #view:;
yourself)]
However I get this error:
MessageNotUnderstood: MACommandColumn>>decorationChainDo:
* MACommandColumn(Object)>>doesNotUnderstand: #decorationChainDo:
self a MACommandColumn
temps
aMessage decorationChainDo: [] in UserComponent
(WAPresenter)>>withNextPresentersDo: {[:ea | ea withNextPresen...etc...
inst vars
report a MAReport
properties a Dictionary()
commands an OrderedCollection(MessageSend(#view: -> an
UserComponent)->'View')
* [] in UserComponent(WAComponent)>>nextPresentersDo: {[:ea | ea
decorationChainDo: aBlock]}
self an UserComponent
temps
aBlock [] in UserComponent(WAPresenter)
>>withNextPresentersDo: {[:ea | ea withNextPresentersDo: aBlock]}
ea a MACommandColumn
inst vars
decoration a WAStateHolder(a WAAnswerHandler)
report a MAReport
* [] in UserComponent(WAComponent)>>childrenDo: {[:ea | ea
ifNotNil: [aBlock value: ea]]}
self an UserComponent
temps
aBlock [] in UserComponent(WAComponent)>>nextPresentersDo:
{[:ea | ea decorationChainDo: aBlock]}
ea a MACommandColumn
inst vars
decoration a WAStateHolder(a WAAnswerHandler)
report a MAReport
* OrderedCollection>>do:
self an OrderedCollection(a MACommandColumn)
temps
aBlock [] in UserComponent(WAComponent)>>childrenDo: {[:ea
| ea ifNotNil: [aBlock value: ea]]}
index 3
inst vars
array an Array(nil nil a MACommandColumn nil nil nil nil
nil nil nil)
firstIndex 3
lastIndex 3
* UserComponent(WAComponent)>>childrenDo:
self an UserComponent
temps
aBlock [] in UserComponent(WAComponent)>>nextPresentersDo:
{[:ea | ea decorationChainDo: aBlock]}
ea a MACommandColumn
inst vars
decoration a WAStateHolder(a WAAnswerHandler)
report a MAReport
Any help please? Thanks!
Sau Sheong
http://blog.saush.com - brain dump
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070425/a67c25b9/attachment.htm
More information about the seaside
mailing list