[Seaside] updateRoot: Weirdness

Liliana liliana at finworks.biz
Wed Jul 18 07:59:36 UTC 2007


Hi.

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

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:
request]].

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

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

ma serveFiles.

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

 

Hope it works 

Liliana

 

 

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
directory 
*	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???

Richard


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
fine.
 
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?
 
Thanks,
Richard

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


More information about the Seaside mailing list