[Seaside] [Newbie]WACachedDocument.inspect?
Bakki Kudva
bakki.kudva at gmail.com
Fri Aug 18 21:54:21 UTC 2006
Michel,
Thank you very muc for that great explanation. I am learning Squeak
and Seaside much faster because of the quality of the traffic on this
list!
-bakki
On 8/18/06, Michel Bany <m.bany at wanadoo.fr> wrote:
> Bakki Kudva a écrit :
>
> > Hi,
> >
> > Is there a way to actually see the images in the Cache of this object?
> > When I do an inspect on the class variable #cache I can see that it is
> > pointing to a Dictionary but cannot see what's in it. I tried inspect,
> > browse etc but cannot figure out how to look inside and see what
> > images and other documents are in it, say when the example counter is
> > running. (which should have 'seaside-top.jpg')
>
>
> The cached images are stored as raw bytes in the Smalltalk image. The
> "seaside-top"
> is returned as raw bytes by class method #seasideBanner of
> SeasidePlatformSupport .
> In Squeak, the inspector is not able to display those strings of bytes.
>
> However you can turn those bytes into images using Seaside rendering
> methods.
> For instance, using file names
> cache := WACachedDocument classPool at: #Cache.
> cache do:
> [:image |
> html image width: 100 px; fileName: image fullFileName].
> using raw bytes
> cache do:
> [:image |
> html image width: 100 px; document: image asMIMEDocument].
> using even rawer bytes
> cache do:
> [:image |
> html image width: 100 px; document: image asMIMEDocument content].
> Finally to display an image from raw bytes returned by a method
> html image document: SeasidePlatformSupport seasideBanner.
>
> Cheers
> Michel.
>
>
>
>
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
More information about the Seaside
mailing list