Adding a library to seaside

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

Adding a library to seaside

keith1y
fao: seaside maintainers

Adding a javascript library to Seaside can be a bit of a pain, since
many of the required hooks are not published in a pluggable way.
Recently I decided to attempt to add the absoluteFudge.js code to try
and improve my chances with ie6, and I cite this as an example.

The js code is packaged as a WAFileLibrary subclass as you might expect.
However it requires an onLoad script to be run.

Jetsam includes a concept known as a SessionHelper, so I added a
WAAbsoluteFudge session helper, which does the right thing in it's
#updateRoot: method, and it works. The helper adds itself to any
applications which use the WAAbsoluteFudgeJS file library.

So.. here we have an example of packaging a typical javascript library
add on, as a couple of classes.

I mention this here, to suggest that the development team to adopt the
helpers framework into the mainstream 2.9+

best regards

Keith

p.s. Nifty corners can be packaged in the same manner.

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

Re: Adding a library to seaside

Philippe Marschall
2008/4/4, Keith Hodges <[hidden email]>:

> fao: seaside maintainers
>
>  Adding a javascript library to Seaside can be a bit of a pain, since many
> of the required hooks are not published in a pluggable way.
>  Recently I decided to attempt to add the absoluteFudge.js code to try and
> improve my chances with ie6, and I cite this as an example.
>
>  The js code is packaged as a WAFileLibrary subclass as you might expect.
> However it requires an onLoad script to be run.
>
>  Jetsam includes a concept known as a SessionHelper, so I added a
> WAAbsoluteFudge session helper, which does the right thing in it's
> #updateRoot: method, and it works. The helper adds itself to any
> applications which use the WAAbsoluteFudgeJS file library.
>
>  So.. here we have an example of packaging a typical javascript library add
> on, as a couple of classes.
>
>  I mention this here, to suggest that the development team to adopt the
> helpers framework into the mainstream 2.9+


MyFileLibrary >> #updateRoot: aHtmlRoot
    super updateRoot: aHtmlRoot.
    WACurrentContext value addLoadScript: 'whatever it need'


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

Re: Adding a library to seaside

keith1y

> MyFileLibrary >> #updateRoot: aHtmlRoot
>     super updateRoot: aHtmlRoot.
>     WACurrentContext value addLoadScript: 'whatever it need'
>
>
> Cheers
> Philippe
"Well well well,  you learn something every day" -- me

thanks Phillippe

Keith


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