[Seaside] Seaside 2.6 Example?

Wilkes Joiner wilkesjoiner at gmail.com
Wed Jan 25 01:37:37 CET 2006


Use the source! This is Smalltalk after all, ;)

I create a class (which should be in Seaside) call WARenderCanvasComponent:

WAComponent subclass: #WARenderCanvasComponent
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'SeasideExtensions'

WARenderCanvasComponent>>rendererClass
    ^ WARenderCanvas

All of my components subclass this.  Which means that renderConentOn:
is passed in an instance of WARenderCanvas.

Then I have 2 hierarchy browsers open, one for WACanvas and one for
WABrush.  I also look at WACanvasTest as a simple example to get a
feel for how the classes work.
The basic idea is that calling a method on WACanvas returns an
instance of WABrush.  From there on it is just browsing the classes to
find out what messages they understand.

Hope this helps,
Wilkes


On 1/24/06, Jeremy Shute <shutej at crazilocks.com> wrote:
> Below, I use WAComponent>>rendererClass and WAComponent>>renderContentOn:.
>  To be absolutely clear, I mean MyWAComponentSubclass>>rendererClass, and
> MyWAComponentSubclass>>renderContentOn:.
>
> Jeremy
>
>
>
> > It isn't just simpler to use, it's vastly preferable because it has a much
> > cleaner interface.  Too bad no one can figure out how to use it without
> > referring to Pier...  (I had to use Pier, myself, in order to figure this
> > out.)
> >
> > Essentially the steps are:
> >
> > 1.  Augment your WAComponent to declare that it's rendered with a
> > different class:
> >
> > WAComponent>>rendererClass
> >   ^ WARenderCanvas
> >
> > ...notice it's "rendererClass", not "renderClass", which had me kicking my
> > computer for a good 10 minutes.
> >
> > 2.  Augment your WAComponent>>renderContentOn: method to actually use the
> > canvas...
> >
> > WAComponent>>renderContentOn: html
> >   (html div) with: [
> >     html text: 'Hello World!'
> >   ]
> >
> > Remember that the "with:" message "paints" the brush (chain all
> > modifications before it, otherwise they won't appear), and go tromping
> > through the Seaside-Canvas and Seaside-Canvas-Tags categories to figure
> > out what's supported...
> >
> > Good luck,
> >
> > Jeremy
> >
> >
> >
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> Rick Zaccone a écrit :
> >>> I'm looking for a Seaside 2.6 example that uses a Canvas?  Any
> >>> example,
> >>> regardless of the size, would be useful.  Would someone  please supply
> >>> a
> >>> pointer?  I didn't see anything on <http://seaside.st/>.
> >>
> >> Have a look at Pier and Magritte, both available on SqueakMap. Canvas is
> >> very simple to use. You can have a look at this post from Avi :
> >> http://lists.squeakfoundation.org/pipermail/seaside/2005-June/005260.html
> >>
> >> - --
> >> Damien Cassou
> >> -----BEGIN PGP SIGNATURE-----
> >> Version: GnuPG v1.4.1 (GNU/Linux)
> >> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> >>
> >> iD8DBQFD1oX63hhx1vOEX5sRAiOfAKCM6kfiqFPuC7kYy+rWUe4JjBG9iACfe2YG
> >> 5jg6e0/ayKyAYgLKm4P6J5I=
> >> =cYsl
> >> -----END PGP SIGNATURE-----
> >> _______________________________________________
> >> Seaside mailing list
> >> Seaside at lists.squeakfoundation.org
> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >>
> >
> >
> > GPG PUBLIC KEY: 0xA2B36CE5
> >
>
>
> GPG PUBLIC KEY: 0xA2B36CE5
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the Seaside mailing list