[Fwd: Re: iliad and blocks]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Fwd: Re: iliad and blocks]

Nicolas Petton
arf, off list again...

Le lundi 22 juin 2009 à 15:05 +0200, Paolo Bonzini a écrit :
> Off list Nicolas suggested using #build: which is just a wrapper method
> calling #value:.

Sorry, I didn't mean to answer off list. I forwarded the email.

You're proposal is just great!
Thanks, I'm committing it right now :)

Cheers!

Nico

>   With it, Joachim's #contents message would look like
>
> > contents [
> >         ^[ :e |
> >             e
> >                 build: self headerContent;
> >                 add: menu build;
> >                 break;
> >                 build: self mainContent;
> >                 build: self footerContents.
> >         ]
> >     ]
> >
>
> My reply is...
>
> Even better for me would be:
>
> Element >> build: aBuildable
> <category: 'building'>
> aBuildable buildOn: self
>
> BlockClosure >> buildOn: anElement
> <category: 'building (Iliad)'>
> self value: anElement
>
> Widget >> buildOn: anElement
> <category: 'building'>
> e add: self build
>
> and then keeping the block structure for #contents, like
>
>      contents [
>          ^[ :e |
>              e
>                  build: self headerContent;
>                  build: menu;
>                  break;
>                  build: self mainContent;
>                  build: self footerContents.
>          ]
>      ]
>
> Paolo

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

signature.asc (204 bytes) Download Attachment
signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: Re: iliad and blocks]

Paolo Bonzini-3

> You're proposal is just great!
> Thanks, I'm committing it right now :)
>
>>      contents [
>>          ^[ :e |
>>              e
>>                  build: self headerContent;
>>                  build: menu;
>>                  break;
>>                  build: self mainContent;

Note that then mainContent could return just a widget, like "^Login new".

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: Re: iliad and blocks]

Nicolas Petton
Le lundi 22 juin 2009 à 15:31 +0200, Paolo Bonzini a écrit :

> > You're proposal is just great!
> > Thanks, I'm committing it right now :)
> >
> >>      contents [
> >>          ^[ :e |
> >>              e
> >>                  build: self headerContent;
> >>                  build: menu;
> >>                  break;
> >>                  build: self mainContent;
>
> Note that then mainContent could return just a widget, like "^Login new".
Yes, that's another improvement :)

It's really nice to have external critics about your code, especially
when you have been locked up alone with it for a while, and don't always
see the mistakes you make...
 
>
> Paolo

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

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: Re: iliad and blocks]

Paolo Bonzini-3

>>>>      contents [
>>>>          ^[ :e |
>>>>              e
>>>>                  build: self headerContent;
>>>>                  build: menu;
>>>>                  break;
>>>>                  build: self mainContent;
>> Note that then mainContent could return just a widget, like "^Login new".
>
> Yes, that's another improvement :)
>
> It's really nice to have external critics about your code, especially
> when you have been locked up alone with it for a while, and don't always
> see the mistakes you make...

These are not mistakes. :-)

Paolo


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