[Seaside] updateRoot: Weirdness

Richard K Eng richard.eng at rogers.com
Wed Jul 18 12:08:25 UTC 2007

Re: [Seaside] updateRoot: WeirdnessSorry, it still didn't help. This is so frustrating! How can something so basic and fundamental to Seaside be so problematic?!!


  ----- Original Message ----- 
  From: Liliana 
  To: 'Seaside - general discussion' 
  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 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 




  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...

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

    a.. I create some HTML in #renderContentOn: 
    b.. 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 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?


  Seaside mailing list
  Seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070718/d1eac072/attachment.htm

More information about the Seaside mailing list