[Seaside] Problem with FileLibrary

Ron Teitelbaum Ron at USMedRec.com
Mon Feb 12 23:56:28 UTC 2007


Philippe,

Thanks for the suggestions I will fix my application.  Just to be clear,
this just recently changed so the change does break applications developed
with relative paths.  

Ron

> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-
> bounces at lists.squeakfoundation.org] On Behalf Of Philippe Marschall
> Sent: Monday, February 12, 2007 5:02 PM
> To: The Squeak Enterprise Aubergines Server - general discussion.
> Subject: Re: [Seaside] Problem with FileLibrary
> 
> 2007/2/12, Ron Teitelbaum <Ron at usmedrec.com>:
> > The change to WAUrl>>pathString breaks my CSS FileLibrary background.
> >
> > .tabRounded .navigation-options {
> >         FONT-SIZE: 93%; BACKGROUND:
> url(files/USMRSTest2FileLibrary/bg.gif)
> > #dae0d2 repeat-x 50% bottom; WIDTH: 100%; LINE-HEIGHT: normal; float:
> left;
> > }
> >
> > Because it now resolves to:
> /seaside/phi/files/USMRSTest2FileLibrary/bg.gif
> > Instead of: /seaside/files/USMRSTest2FileLibrary/bg.gif
> >
> > WAUrl>>pathString
> >         ^ String streamContents: [ :stream |
> >                 stream nextPut: $/.
> >                 path
> >                         do: [ :each | stream nextPutAll: each ]
> >                         separatedBy: [ stream nextPut: $/ ] ]
> >
> > was changed to:
> > WAUrl>>pathString
> >        ^ String streamContents: [ :stream |
> >        path do: [ :each |
> >                         stream
> >                                 nextPut: $/;
> >                                 nextPutAll: each ].
> >                 stream nextPut: $/ ]
> >
> > The difference appears to be the last $/ which possibly affects the way
> that
> > FileLibrary resolves the path.  So is this a bug to Filelibrary or
> should we
> > change the css to include the application path?
> 
> I guess your application is at /seaside/phi, right?
> files/USMRSTest2FileLibrary/bg.gif
> Is a relative URL (like a relative path in Unix) the full depends on
> the current "directory" so from /seaside/phi is should really resolve
> to /seaside/phi/files/USMRSTest2FileLibrary/bg.gif. So far it looks
> for me as everything is doing as it should. Yes file library can't
> handle it because it points to /seaside/phi instead of /seaside/files
> but that was to be expected.
> (I hope this was understandable)
> 
> The best thing to do IMHO would be to use absolute urls:
> BACKGROUND: url(/seaside/files/USMRSTest2FileLibrary/bg.gif)
> 
> If you put your css in the same file library subclass as the
> background image you can also use
> 
> BACKGROUND: url(bg.gif)
> 
> Cheers
> Philippe
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




More information about the Seaside mailing list