[Seaside] overriding RRHandlerEditor for RSS
xrdawson at gmail.com
Wed Jul 9 08:36:02 UTC 2008
Ah, great information Phillipe. Thanks, I'll review and implement anew
tomorrow based on your suggestions. And, great blog post Michael.
On Tue, Jul 8, 2008 at 9:51 PM, Philippe Marschall <
philippe.marschall at gmail.com> wrote:
> 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
> > the source for a while and am not sure how to troubleshoot this. If I
> > self halt. within registerAsApplication nothing happens, neither with a '
> > / 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
> > 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.
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside