Hi, I was going to write this as a comment to one of Joachim's post but maybe it's better to post here. The relevant post is http://smalltalk.gnu.org/blog/joe/one-step-further-iliad and some comments may not make sense without referring to there.

Joachim builds a PageTemplate widget, and I'm not sure I like the idea of returning blocks from the methods there (like #mainContent). I would rather use something like #renderMainContentOn:

UrPics.PageTemplate subclass: UnknownHome [
    renderMainContentOn: e [
        e h1: 'UnknownHome Object!'.
    ]
]


Another idea could be to add

BlockClosure extend [
    renderOn: e [ self value: e ]
]

and implement Widget>>renderOn: like this

renderOn: e [ e add: self build ]

This way, you could simply return "^Login new" from the message #login in Joachim's Menu widget.

Now maybe I misunderstood Iliad's architecture (which I haven't looked at in detail yet), so the above does not make sense. Just throwing 2 cents.

Paolo


_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to