[Seaside] Weird problem with libraries

Mariano Martinez Peck marianopeck at gmail.com
Wed Jul 15 00:25:54 UTC 2009

Hi folks,

I have a problem with a library. I am using a Pier Gallery addon that uses
Prototype.js, scriptaculus, builder, effects, etc. My application DOESN'T
have SULibrary added. It has it's own library called DestinoMochilaLibrary
with this method:

    ^ #(destinoMochilaCss)

Now, to be able to use that plugin I override the method updateRoot: like

DestinoMochilaLibrary>>updateRoot: aHtmlRoot
    super updateRoot: aHtmlRoot.
    aHtmlRoot javascript url: '
    aHtmlRoot javascript url: '
    aHtmlRoot javascript url: 'http://www.roard.com/lightbox2/js/lightbox.js
    aHtmlRoot stylesheet url: '

Obviously this is not good because I am requesting another website. Thus, I
wanted to have it locally. Then I did this:
- Add SULibrary to my application
- Downloaded the http://www.roard.com/lightbox2/js/lightbox.js and
http://www.roard.com/lightbox2/css/lightbox.css because they are not in
- Then I uploaded both files to SULibrary and I could perfectly see the new
methods lightboxJs and lightboxCss in SULibrary.
- I can also see all links in http://localhost:8888/seaside/files/SULibrary/
- Removed DestinoMochilaLibrary>>updateRoot:

The problem is that if I remove the DestinoMochilaLibrary>>updateRoot:
(which should be not used now), the plugin doesn't work. It is like if
cannot find the javascript libraries.

Let's take the example of protoype. In the first version, my html rendered

<script type="text/javascript" src="

which is correct. After my changes, I see:

<script type="text/javascript"

which I think it is also correct.

Now...what can be the problem that the plugin doesn't work ???

More information. If I change my code to this:

updateRoot: aHtmlRoot
    super updateRoot: aHtmlRoot.
    aHtmlRoot javascript url: '
    aHtmlRoot javascript url: '
    aHtmlRoot javascript url: '
    aHtmlRoot javascript url: '
    aHtmlRoot stylesheet url: '

It works perfect!! But I don't think I have to do this...I must be doing
something wrong.

Thanks a lot for the help in advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090714/0d3ad901/attachment.htm

More information about the seaside mailing list