[Newbies] Chaining versus cascading

Chris Cunningham cunningham.cb at gmail.com
Thu Sep 20 17:51:55 UTC 2007


On 9/20/07, Chris Cunnington <cunnington at sympatico.ca> wrote:
>
> Hi,
>
> I have a question about the difference between chaining and cascading.
> What
> would happen if you wrote this:
>
> Html table id: 'label' with: [foo foo foo]
>
> You see, I've left out the semicolon that the sushi store demo puts
> between
> 'label' and with. It usually looks like this:
>
> Html table id: 'label'; with: [foo foo foo]


Well, the first example is sending the method *#id:with:* to *Html table.  *The
second example is the equavalent of:
*Html table id: 'label'.*
*Html table with: [foo foo foo].*

The cascading operator (the semicolon ;) causes the next message (#with:) to
be sent to the previous messages (#id:) receiver (in this case, Html table).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20070920/3a83ae39/attachment.htm


More information about the Beginners mailing list