[Seaside] with: takes block vs string

Gerhard Obermann obi068 at gmail.com
Wed Jul 23 12:23:58 UTC 2008


Sorry i am reading too fast.
script: is an exception because javascript is only evaluated on the client.
Obviously you cant pass a block to javascript.

Just look at WAScriptTag!

> self document nextPutAll: aString displayString

It only takes the displayString of the argument.

br
Gerhard


On Wed, Jul 23, 2008 at 2:00 PM, SainTiss <saintiss at gmx.net> wrote:

> In that case, how come:
>
> html script with: [html text: 'testing']
>
> renders:
>
> <script type="text/javascript">/*<![CDATA[*/[] in
> STAAMenuComponent>>renderContentOn: {[html text:
> 'testing']}/*]]>*/</script>
>
> while html script with: 'testing'
>
> renders:
>
> <script type="text/javascript">/*<![CDATA[*/testing/*]]>*/</script>
>
> ?
> This is what I mean by the script tag expecting a string. Sure, you can
> pass
> it a block, but the block won't be evaluated as I would like it to be.
>
> Or did I misunderstand you?
>
> Thanks,
>
> Hans
>
> On Wednesday 23 July 2008 13:53:00 Gerhard Obermann wrote:
> > That is not correct.
> >
> > Look at the implemenation in WATagBrush.
> > with: 'asdasd' and with: [] and: with: anyKindOfObject
> > is basically available for all tags!
> >
> > The argument of #with: is rendered using
> > double dispatching, therefore any object can be
> > passed as argument.
> >
> > br
> > Gerhard
>
>
>
> --
> A liberal is a person whose interests aren't at stake at the moment
>  -- Willis Player
>
> Hans Schippers
> Research Assistant of the Research Foundation - Flanders (FWO - Vlaanderen)
> http://www.win.ua.ac.be/~hschipp/ <http://www.win.ua.ac.be/%7Ehschipp/>
> Formal Techniques in Software Engineering (FoTS)
> University of Antwerp
> Middelheimlaan 1
> 2020 Antwerpen - Belgium
> Phone: +32 3 265 37 88
> Fax: +32 3 265 37 77
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080723/a21b6eaa/attachment.htm


More information about the seaside mailing list