[Newbies] Can a block be a string?

Randal L. Schwartz merlyn at stonehenge.com
Thu Feb 18 23:17:29 UTC 2010


>>>>> "Andy" == Andy Burnett <andy.burnett at knowinnovation.com> writes:

Andy> When I looked at the definition for paragraph:  it says that takes a aBlock,
Andy> but then doesn't seem to do a value: aBlock.  So, what I am wondering is
Andy> whether it is valid to give a string as a block, or whether this is just a
Andy> slightly loose definition of block?

As I recall, the seaside things that have contents accept "renderables",
which is anything that understands #renderOn:.  Seaside monkey-patches
Object to ensure that *everything* has a #renderOn:, but there are special
overrides for Collection, String, and, as you've discovered, BlockContext.

Browse all implementors of #renderOn: for more illumination.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


More information about the Beginners mailing list