Strange script behavior

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

Strange script behavior

Robert Sirois
Has anyone had a problem where you load a script like this...

renderMeOn: html

self renderPlatformOn: html.

html div
script: ((self renderObjectsOn: html) timeout: 1 second).

renderObjectsOn: html
| js | js := OrderedCollection new.
self class objects do: [:o |
js add: ((html jQuery: o cssSelector) html: o).
].

^js javascriptItemsConcatenated.


... and the first query never selects an id? Oddly enough, if I add a meaningless item first:

renderObjectsRevisedOn: html
| js | js := OrderedCollection with: (html jQuery: 'blah').
self class objects do: [:o |
js add: ((html jQuery: o cssSelector) html: o).
].

^js javascriptItemsConcatenated.

It works just fine?

RS

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Strange script behavior

Lukas Renggli
Don't know what #javascriptItemsConcatenated does, but there is
already such functionality in Seaside. In the class JSScript, if I
remember correctly. Maybe that makes a difference?

Lukas

On Friday, 18 February 2011, Robert Sirois <[hidden email]> wrote:

>
>
>
>
>
> Has anyone had a problem where you load a script like this...
> renderMeOn: html
> self renderPlatformOn: html.
> html div script: ((self renderObjectsOn: html) timeout: 1 second).
> renderObjectsOn: html | js | js := OrderedCollection new. self class objects do: [:o | js add: ((html jQuery: o cssSelector) html: o). ].
> ^js javascriptItemsConcatenated.
>
> ... and the first query never selects an id? Oddly enough, if I add a meaningless item first:
> renderObjectsRevisedOn: html | js | js := OrderedCollection with: (html jQuery: 'blah'). self class objects do: [:o | js add: ((html jQuery: o cssSelector) html: o). ]. ^js javascriptItemsConcatenated.
> It works just fine?
> RS  
>

--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Strange script behavior

Robert Sirois
Ah, thanks. I had been using my method for a long time now with no problem... hm.

The JSScript functionality works perfectly, thank you.

RS

> Date: Fri, 18 Feb 2011 08:02:14 +0100
> Subject: Re: [Seaside] Strange script behavior
> From: [hidden email]
> To: [hidden email]
>
> Don't know what #javascriptItemsConcatenated does, but there is
> already such functionality in Seaside. In the class JSScript, if I
> remember correctly. Maybe that makes a difference?
>
> Lukas
>
> On Friday, 18 February 2011, Robert Sirois <[hidden email]> wrote:
> >
> >
> >
> >
> >
> > Has anyone had a problem where you load a script like this...
> > renderMeOn: html
> > self renderPlatformOn: html.
> > html div script: ((self renderObjectsOn: html) timeout: 1 second).
> > renderObjectsOn: html | js | js := OrderedCollection new. self class objects do: [:o | js add: ((html jQuery: o cssSelector) html: o). ].
> > ^js javascriptItemsConcatenated.
> >
> > ... and the first query never selects an id? Oddly enough, if I add a meaningless item first:
> > renderObjectsRevisedOn: html | js | js := OrderedCollection with: (html jQuery: 'blah'). self class objects do: [:o | js add: ((html jQuery: o cssSelector) html: o). ]. ^js javascriptItemsConcatenated.
> > It works just fine?
> > RS
> >
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside