[Seaside] some trouble getting started
Tassilo Philipp
tphilipp at potion-studios.com
Mon Nov 10 20:27:24 UTC 2008
Ok, I figured it out - the registerAsApplication message has to be sent to the class and not the class' instance, of course, and about the halos: in the seaside version I'm using it seems to be a decoration and not a toolconfig... however, the halos seem to be partly broken on GST :(
On Sun, 9 Nov 2008 16:11:13 +0100
Tassilo Philipp <tphilipp at potion-studios.com> wrote:
> 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!!
> Aborted
>
> 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)
> nil
>
> 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.
> Thanks!
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
--
Tassilo Philipp <tphilipp at potion-studios.com>
More information about the seaside
mailing list