[Seaside] updateRoot: Weirdness

Liliana liliana at finworks.biz
Wed Jul 18 14:19:44 UTC 2007

WAKom is a http server which serves files.


Richard, I just copied and pasted the code below.


(FileDirectory default directoryNamed: 'FileRoot') fullName

returns : 'C:\squeak39\FileRoot'

so it expects your files in a FileRoot subdirectory of your squeak
directory. If you have the files in the squeak directory replace that with:

 FileDirectory default fullName




From: Richard K Eng [mailto:richard.eng at rogers.com] 
Sent: 18 July 2007 02:45 PM
To: Seaside - general discussion
Subject: Re: [Seaside] updateRoot: Weirdness


Okay, here's a further hint as to what's going on...


If I run the code snippet below in my original development image, the
stylesheets STOP WORKING! So I think it *is* related somehow to the
configuration of the web server. But I don't know how or what's missing. Any







----- Original Message ----- 

From: Liliana <mailto:liliana at finworks.biz>  

To: 'Seaside - general discussion'
<mailto:seaside at lists.squeakfoundation.org>  

Sent: Wednesday, July 18, 2007 3:59 AM

Subject: RE: [Seaside] updateRoot: Weirdness



You probably need to enable file serve. You may have enabled it in your old

I've got this snippet of code from somewhere, possibly Ramon' blog... can't
remember right now...


"Kill all existing Kom HTTP servers"

"Start a new server servering both static content and seaside apps"

| ma seaside |

HttpService allInstancesDo: [:each | each stop. each unregister].

seaside := WAKom default.

ma := ModuleAssembly core.

ma serverRoot: (FileDirectory default directoryNamed: 'FileRoot') fullName.

ma alias: '/seaside' to: [ma addPlug: [:request | seaside process:

ma documentRoot: (FileDirectory default directoryNamed: 'FileRoot')

ma directoryIndex: 'index.html index.htm'.

ma serveFiles.

(HttpService startOn: 8080 named: 'httpd') plug: ma rootModule.


Hope it works 




From: Richard Eng [mailto:richard.eng at rogers.com] 
Sent: 18 July 2007 06:44 AM
To: Seaside - general discussion
Subject: Re: [Seaside] updateRoot: Weirdness


This is totally INSANE!!! No matter what I do, I can't get stylesheets to
work in Seaside.

I even went back to the bare basics...

*	I took a fresh copy of Squeak 3.9 
*	I put a fresh copy of Damien's Seaside 2.7 image into the Squeak
*	I put the CSS files colour.css and styles.css into the same
directory (putting it in the root for simplicity) 
*	I subclass WAComponent to create GSTemplate 
*	I create class method #canBeRoot: for GSTemplate 
*	I create #updateRoot: 

super updateRoot: aRoot.
aRoot linkToStyle: '/colour.css'.
aRoot linkToStyle: '/styles.css'

*	I create some HTML in #renderContentOn: 
*	In Seaside config, I create application "NewApp" using GSTemplate 

I ought to see the HTML rendered according to the specified stylesheets.
What could be simpler?

But it doesn't work!

And it worked in my original development image! For the life of me, I can't
see ANY difference between the original image and this one. What the hell is
going on???


On 7/17/07 6:15 PM, "Richard K Eng" <richard.eng at rogers.com> wrote:

Okay, in my Seaside 2.7 development image, I used updateRoot: to get my app
to use CSS files in a particular location (using linkToStyle:). This works
But now I'm trying to create a fresh image and the updateRoot: method is no
longer having the intended effect--the CSS files are ignored. I must've
"accidentally" got it working in the original image.
So the question is: How do I correctly apply updateRoot: to get my app to
use CSS files?


Seaside mailing list
Seaside at lists.squeakfoundation.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070718/78360688/attachment.htm

More information about the Seaside mailing list