[Seaside] some trouble getting started

Tassilo Philipp tphilipp at potion-studios.com
Sun Nov 9 15:11:13 UTC 2008

Sorry for double posting this, but my initial post wasn't meant to be a reply to "WACompound: creating Seaside Widgets".
Here's my post:

Hello mailing list,

I'm new to seaside and have some questions about the setup, etc.
I'm trying to run Seaside on GNU Smalltalk 3.1 but gst-remote doesn't seem to work correctly on my machine. So I tried to get around that without using gst-remote.

For the sake of completeness, although this isn't a GST mailing list: I tried to follow the 'Seaside on GST' section at the GST website, but the following simple test already fails, and well, pretty much everything I try to --eval fails.

# gst-remote --daemon
gst-remote server started.
# gst-remote --eval '12 factorial'
/usr/local/share/smalltalk/kernel/../scripts/Remote.st:275: Aborted
/usr/local/share/smalltalk/kernel/../scripts/Remote.st:275: Aborted
/usr/local/share/smalltalk/kernel/../scripts/Remote.st:275: Error occurred while not in byte code interpreter!!

Well, since this isn't a GST mailing list, let's talk about seaside - for starters I just tried to get seaside running without gst-remote, and this is what I came up with (trying to recreate the simple counter example):

PackageLoader fileInPackage: 'Seaside'.
PackageLoader fileInPackage: 'Seaside-Development'.
PackageLoader fileInPackage: 'Seaside-Examples'.

Seaside.SwazooSeaside startOn: 9999.

Seaside.WAComponent subclass: MyCounter [
        | count |
        MyCounter class >> canBeRoot [ ^true ]

        initialize [
                super initialize.
                count := 0.
        states [ ^{ self } ]
                renderContentOn: html [
                html heading: count.
                html anchor callback: [ count := count + 1 ]; with: '++'.
                html space.
                html anchor callback: [ count := count - 1 ]; with: '--'.

app := MyCounter registerAsApplication: 'mycounter'.
Processor activeProcess suspend

This starts the swazoo server, registers my counter, and well... works without gst-remote (running gst in foreground, of course).

However, putting 'self registerAsApplication: 'mycounter'.' in 'initialize', and creating a MyCounter instance with 'app := MyCounter new.' instead of registering it as in the code snippet above doesn't work, yielding:

Object: MyCounter new "<-0x4c75e6a0>" error: did not understand #registerAsApplication:
MessageNotUnderstood(Exception)>>signal (AnsiExcept.st:216)
MyCounter(Object)>>doesNotUnderstand: #registerAsApplication: (AnsiExcept.st:1556)
MyCounter>>initialize (a String:5)
MyCounter class(Seaside.WAPresenter class)>>new (Seaside-Core.star#VFS.ZipFile/Seaside-Core.st:9693)
UndefinedObject>>executeStatements (a String:1)

Why is that?

Another thing that I didn't manage to figure out is how to display halos - in the configuration panel for the 'mycounter' application, there is no WAToolConfiguration as described by Paolo: http://smalltalk.gnu.org/blog/bonzinip/seaside-development-gnu-smalltalk#comment-62

Evaluating 'app preferenceAt: #deploymentMode put: false.' yields:
Object: WAUserConfiguration new "<-0x4c7b98d8>" error: No attribute named #deploymentMode

However, evaluating 'app deploymentMode' yields 'false'.

I'm a bit confused now, because I seems that I'm in development mode, but I don't see any toolbar at the bottom of the page.

If someone could shed some light on this, please? Well, I'm new to seaside and I don't have a strong Smalltalk background, so please excuse if I did miss the obvious.

More information about the seaside mailing list