[Seaside] Inserting graphics with Seaside and VisualWorks
Boris Popov
boris at deepcovelabs.com
Tue Jul 18 20:32:09 UTC 2006
There's an easier way if you're developing something beyond a simple
experiment. Check out a bundle in Public Repository called
SeasideImageTools, which contains a whole separate seaside-based application
for managing your Seaside resources such as scripts, styles and images. In
your case, you'd need a class to hold onto the pictures, say MyPictures,
which you can create with the designer tool itself. Once you upload images
to MyPictures, they get stored in methods there for later inclusion in your
rendering code via,
(html image)
url: (self pictures addToPath: 'banner');
altText: 'My Happy Banner'
where #pictures is something along the lines of,
^WAUrl new addToPath: '/images/MyPictures'
(or '/seaside/go/images/MyPictures' if you don't have SeasideShortPath
loaded)
Once you load SeasideImageTools, navigate your browser over to,
http://localhost:8008/WebDesignerTool
(or http://localhost:8008/seaside/go/WebDesignerTool if you don't have
SeasideShortPath loaded)
Did I mention you might want to load SeasideShortPath? :)
Hope this helps,
-Boris
--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
boris at deepcovelabs.com
CONFIDENTIALITY NOTICE
This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.
Thank you.
-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Carl Gundel
Sent: Tuesday, July 18, 2006 1:17 PM
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] Inserting graphics with Seaside and VisualWorks
I'm trying to use the same code that Seaside uses to insert graphics into my
Seaside application. The following is used in a couple of places in Seaside
to inject a banner.
html
imageWithDocument: SeasidePlatformSupport seasideBanner
mimeType: 'image/jpeg'
fileName: 'seaside.jpg'.
The method seasideBanner returns an instance of ByteArray. I have install a
jpeg in the form of a CachedImage by loading my jpeg file using:
ImageReader imageFromFile: (OpenFileDialog new select) toClass:
RunBASIC selector: #banner
but the image does not show up when my app runs. I guess that perhaps I
need to serve up my image as a ByteArray but I cannot seem to find any way
to produce the same format as the Seaside example has.
-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com
_______________________________________________
Seaside mailing list
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3370 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20060718/1129a66a/smime.bin
More information about the Seaside
mailing list