|
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) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |