[Seaside] overriding RRHandlerEditor for RSS

Philippe Marschall philippe.marschall at gmail.com
Wed Jul 9 04:51:30 UTC 2008

2008/7/5 Chris Dawson <xrdawson at gmail.com>:
> I want to create a new configuration dialog for my RSS component.  I've
> already created the proper class deriving from RRComponent and that is
> working well.  I want to override the RRHandlerEditor as well.  It is not
> calling my component and I am not sure why or how to debug.

RRHandlerEditor (or subclasses) as the name suggests, work on
RRRssHandler instances or subclasses. All the editors never work
directly on components. New components are instantiated at least for
every session.

> What I did:  I already have a class MyRssComponent (derived from
> RRComponent) which properly implements isFeed and canBeRoot on the class
> side.   I added two classes, one called MyRssHandlerEditor (deriving from
> RRHandlerEditor) and MyRssHandler (deriving from WAEntryPoint).

You should probably derive from RRRssHandler, not WAEntryPoint.

>  Inside of
> MyRssHandler I override only configurationComponent and change it to
> instantiate an instance of MyRssHandlerEditor:
> configurationComponent
>     ^MyRssHandlerEditor new
>         handler: self;
>         yourself
> Then, inside of MyRssHandlerEditor I override renderFormOn: so that it is
> changed slightly from .  I also override registerAsApplication as a class
> method inside of MyRssComponent that looks like this:
> registerAsApplication: aString
>     WADispatcher default
>         register: ((MyRssHandler named: aString)
>             rootComponent: self;
>             yourself)

Are you sure #named: is what you need?

> I never see the editor I've defined get called.  I've been browsing around
> the source for a while and am not sure how to troubleshoot this.  If I call
> self halt. within registerAsApplication nothing happens, neither with a ' 1
> / 0. '

#registerAsApplication: never gets sent automatically, you'll have to
do it yourself. The configuration component should show up in the
configuration interface (in general under /seaside/config).

> I do notice that if I put a 'self halt' into the registerAsApplication that
> the icon in the squeak browser changes from a green down arrow to a red
> flag.  I assume this means something.

It means you put a halt in there.

> I've noticed that the
> registerAsApplication within RRComponent is a double-headed green arrow.
> Can someone point out where I can understand what these mean?

It means it's overriding a method and as well being overridden.


More information about the seaside mailing list