help-smalltalk
[Top][All Lists]
Advanced

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

[Fwd: Re: [Help-smalltalk] iliad and blocks]


From: Nicolas Petton
Subject: [Fwd: Re: [Help-smalltalk] iliad and blocks]
Date: Mon, 22 Jun 2009 14:20:32 +0200

--- Begin Message --- Subject: Re: [Help-smalltalk] iliad and blocks Date: Mon, 22 Jun 2009 14:18:14 +0200
Le lundi 22 juin 2009 à 14:03 +0200, Paolo Bonzini a écrit :
> 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).

Why don't you like it? I think blocks are expressive and less verbose
here.

>   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.

No, it could make sense.

>   Just throwing 2 cents.
> 
> Paolo
> 
> 
> _______________________________________________
> help-smalltalk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-smalltalk

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


--- End Message ---

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


reply via email to

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