[Seaside] state of the aubergine

Nevin Pratt nevin@smalltalkpro.com
Sun, 21 Apr 2002 22:29:07 -0600


  Avi Bryant wrote:

>So, I think the issue here is that the defaults for the <img> tag used to
>suck.  It used to be that <img src="@foo"> would create a path binding,
>that is, would look for a method named #foo and use the result of that as
>the src attribute (appended to the configurable "document root", which
>should maybe be renamed to something like "url prefix", of the app).
>
>What it does now is uses a literal binding by default, so if your app is
>configured to have a doc root of http://smalltalkpro.com/images, then
><img src="@foo.jpg"> will become
><img src="http://smalltalkpro.com/images/foo.jpg">.  Notice that this
>allows images to be served statically (likely even by a different
>webserver), without requiring hardcoded paths, or any funny business with
>IAKom.  
>  
>

OK, I did the following:

1. Grabbed a "virgin" 3.2gamma image.
2. Made sure the image had all the latest 3.2gamma updates by selecting 
"load code updates" from the "Squeak" tab.  It loaded and installed 
exactly one additional 3.2gamma update, for whatever that's worth.
3. Filed in 'kom49-base.11May354.cs' (the Comanche filein-- is there a 
newer one?)
4. Downloaded and filed in 'SSVS.cs'.
5. Evaluated the following:
   (SSVS forModule: 'seabed') update.
   (SSVS forModule: 'seaside') update.
6. Created an IAPastWork subclass of IAComponent.
7. Gave IAPastWork an #html instance method that returned a string.
8. Copied the html output from my son's old (static) 'pastwork.html' 
file he created with Dreamweaver to the #html method of the new 
IAPastWork class.
9. Defined a 'pastwork' seaside application to use the new IAPastWork 
component.
10. Started up an IAKom session on port 80.
   (for the following, note that my test machine is known on my internal 
network as 'test.com' or ' www.test.com')
11. Hit the following URL from my (Mozilla on Linux) browser: 
http://www.test.com/seaside/pastwork

It did not work.  It did not display the static files referenced in the 
'pastwork.html' code placed in the #html method.  However, it displayed 
all of the rest of the html code.  It just did not display the images.

In contrast, referencing the same html code using only Comanche, without 
Seaside, works fine: http://www.test.com/pastwork.html , so yes, all of 
the images are in place.  Likewise, loading the 'pastwork.html' file 
directly into the browser again works just fine.  So again, yes, all of 
the images are in place.  But, trying to use the same html code in an 
#html method of a seaside app just doesn't work.  The static images 
never get served.

Hopefully in a day or two I'll have more time to track down *why* it did 
not work.  But in any case, I still don't see an easy way to use 
Dreamweaver html in a Seaside app.

Nevin