help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] iliad and blocks


From: Paolo Bonzini
Subject: [Help-smalltalk] iliad and blocks
Date: Mon, 22 Jun 2009 14:03:32 +0200
User-agent: Thunderbird 2.0.0.17 (X11/20081009)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]