[Seaside] Calendar Example

Avi Bryant seaside@lists.squeakfoundation.org
Tue, 17 Sep 2002 13:44:27 -0700 (PDT)


On Tue, 17 Sep 2002, Glenn Swanlund wrote:

> Part 2 of the tutorial mentions a calendar to be discussed in the next
> tutorial. Would this calendar example be available to study now?

Sadly, no.  A while back, Jim Benson was working on a very nice calendar
app, but I haven't heard from him for a while, so I don't know whether he
has anything you could look at.

If you want an example of the usage of subcomponents, you might want to
study the 'store' example included with Seaside (Seaside-Examples-Store).
It exercises most of the Seaside's subcomponent capabilities.  A simple
example is IAStoreFrame, which puts a simple border up and embeds two
subcomponents, IAStoreCart and IAStoreList, that do the bulk of the work.
This is a very common pattern in Seaside.  More complex subcomponent use
in the store example that you can puzzle through (or ask me about)
includes:

- IAStoreList embeds a IAStoreItemView within a repeating table;
IAStoreItemView implements #defaultCallbacks and #defaultDisplayEvent to
change its 'item' variable each time through the repeat.

- In IAStoreItemView>>buy, there is a call to "parent inform:".  This is
making use of the ability to control which component is swapped out by a
#callPage: (if it had been "self inform:", the IAStoreItemView would have
been replaced by the message but the IAStoreList enclosing it would have
remained.  If it had been "root inform:", the entire page would have been
replaced).

Avi