stylesheet rendering problem on seaside 3.0
Nick Ager
nick.ager at gmail.com
Tue Jan 12 23:59:54 MET 2010
I've tried to encapsulate the problem in a test:
| stylesheetFile stylesheetContents rendererResult |
stylesheetContents := '/* a style sheet */'.
stylesheetFile := (PRFile named: 'defaultCss') filename: 'style.css';
mimetype: 'text/css'; contents: stylesheetContents.
rendererResult := WARenderCanvas builder render: [ :html |
html render: stylesheetFile file contents].
self assert: rendererResult = stylesheetContents
In my image the assertion fails. If I change ByteArray>>greaseString to
return self displayString the assertion succeeds.
Does that help?
2010/1/12 Julian Fitzell <jfitzell at gmail.com>
> I'm seeing the same as Nick, fwiw. Same if I try to edit the stylesheet.
>
> Julian
>
> On Tue, Jan 12, 2010 at 2:59 AM, Lukas Renggli <renggli at gmail.com> wrote:
> > #[100 101 98 117 103 103 105 110 103], but this method is never called
> > when I browse Pier.
> >
> > Lukas
> >
> >
> > 2010/1/12 Nick Ager <nick.ager at gmail.com>:
> >> Hi Lukas,
> >> Don't think the browse cache is the problem. What do you get with:
> >> #[100 101 98 117 103 103 105 110 103] greaseString
> >> on my image the result:
> >> '#[100 101 98 117 103 103 105 110 103]'
> >>
> >> 2010/1/12 Lukas Renggli <renggli at gmail.com>
> >>>
> >>> > Does your the implementation of
> >>> > ByteArray>>greaseString match this:
> >>> > ByteArray>>greaseString
> >>> > "ByteArrays should not automatically be converted to Strings. You
> should
> >>> > use
> >>> > a GRCodec for this."
> >>> > ^ self printString
> >>>
> >>> Yes.
> >>>
> >>> > or does your image have an implementation of ByteArray>>encodeOn?
> >>>
> >>> No.
> >>>
> >>> Maybe you should clear your browser caches?
> >>>
> >>> Lukas
> >>>
> >>> > 2010/1/11 Lukas Renggli <renggli at gmail.com>
> >>> >>
> >>> >> Has this been fixed, because it works here?
> >>> >>
> >>> >> Lukas
> >>> >>
> >>> >> 2010/1/11 Julian Fitzell <jfitzell at gmail.com>:
> >>> >> > Maybe we need to implement #encodeOn: on ByteArray? Lukas?
> >>> >> >
> >>> >> > Julian
> >>> >> >
> >>> >> > On Mon, Jan 11, 2010 at 4:40 AM, Nick Ager <nick.ager at gmail.com>
> >>> >> > wrote:
> >>> >> >> On the pier seaside 3.0 code-branch, browsing
> >>> >> >> to: http://localhost:8080/pier/environment/style.css, results
> in:
> >>> >> >> #[47 42 32 98 108 117 101 112 114 105 110 ...
> >>> >> >> rather than:
> >>> >> >> /* blueprint patches */
> >>> >> >> h1, h2, h3, h4, h5, h6 { margin: 0; fo....
> >>> >> >> This issue is caused by a change in how ByteArray is rendered in
> >>> >> >> Seaside 3.0
> >>> >> >> (the problem was also present prior to merging the latest Pier
> >>> >> >> code):
> >>> >> >> seaside 2.8
> >>> >> >> Object>>encodeOn: aDocument
> >>> >> >> aDocument print: self displayStriong
> >>> >> >> seaside 3.0
> >>> >> >> Object>>encodeOn: aDocument
> >>> >> >> aDocument print: self greaseString
> >>> >> >> ByteArray>>greaseString
> >>> >> >> "ByteArrays should not automatically be converted to Strings. You
> >>> >> >> should use
> >>> >> >> a GRCodec for this."
> >>> >> >> ^ self printString
> >>> >> >> changing ByteArray>>greaseString to return self displayString
> fixes
> >>> >> >> the
> >>> >> >> problem. However I can see there are a number of ways to fix
> this,
> >>> >> >> and
> >>> >> >> as
> >>> >> >> it's such a low level change I'm sure there was a good reason for
> >>> >> >> displayString to be changed to printString. Thoughts?
> >>> >> >>
> >>> >> >> _______________________________________________
> >>> >> >> Magritte, Pier and Related Tools ...
> >>> >> >> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
> >>> >> >>
> >>> >> >
> >>> >> > _______________________________________________
> >>> >> > Magritte, Pier and Related Tools ...
> >>> >> > https://www.iam.unibe.ch/mailman/listinfo/smallwiki
> >>> >> >
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> Lukas Renggli
> >>> >> http://www.lukas-renggli.ch
> >>> >>
> >>> >> _______________________________________________
> >>> >> Magritte, Pier and Related Tools ...
> >>> >> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
> >>> >
> >>> >
> >>> > _______________________________________________
> >>> > Magritte, Pier and Related Tools ...
> >>> > https://www.iam.unibe.ch/mailman/listinfo/smallwiki
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Lukas Renggli
> >>> http://www.lukas-renggli.ch
> >>>
> >>> _______________________________________________
> >>> Magritte, Pier and Related Tools ...
> >>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
> >>
> >>
> >> _______________________________________________
> >> Magritte, Pier and Related Tools ...
> >> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
> >>
> >
> >
> >
> > --
> > Lukas Renggli
> > http://www.lukas-renggli.ch
> >
> > _______________________________________________
> > Magritte, Pier and Related Tools ...
> > https://www.iam.unibe.ch/mailman/listinfo/smallwiki
> >
>
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20100112/295e5670/attachment-0001.html>
More information about the smallwiki
mailing list