Serving static graphics with comanche

Jim Adkins jim.adkins at comcast.net
Thu Dec 22 12:41:25 UTC 2005


The following is an abstract from http://coweb.cc.gatech.edu/cs2340/2913



Getting Commanche to display an image was a bit of a challenge. Don't assume
it knows where your data files are stored, because it doesn't, plus that
would be of no help anyway since it can't directly display an image sitting
in your squeak directory. The way to display an image, is to first create a
form from a file sitting in your squeak directory. We had an image
'squeaken.gif' in ours, so we created an instance variable 'form' as such:

form := Form fromFileNamed: 'squeaken.gif'.


When I mentioned before that we could emulate url prefixes with this module,
this is where it came into use. Wherever you want to display your image, the
url prefix needs to be changed to something that can be recognized later as
containing an image, although you can change it to anything as long as you
know that that prefix represents an image. If that sounds a bit confusing,
just observe this html code:

<img src="', (self urlPattern copyReplaceAll: '' with: '/squeaken.gif'), '">



Hope this helps...




-----Original Message-----
From: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] On Behalf Of Wilkes
Joiner
Sent: Wednesday, December 21, 2005 6:17 PM
To: The general-purpose Squeak developers list; The Squeak Enterprise
Aubergines Server - general discussion.
Subject: Serving static graphics with comanche

Is there a magic trick to serving graphic files via comanche?  Do I
need to do something with the ImageReaderWriter?  Like:

http://lists.squeakfoundation.org/pipermail/seaside/2004-September/003640.ht
ml

Just to be clear here is the directory structure:
public_html/
     index.html "has <img src="logo.gif"/> "
     logo.gif

The page is served without the graphic.

Thanks,
Wilkes






More information about the Squeak-dev mailing list