On 7/5/05, Michael Peters <[EMAIL PROTECTED]> wrote:
> Right, but how do you register a callback for init on this newly blessed
> object? You won't see it until after the init hook is already called.

Yup.  That was one of the reasons I originally left out the init hook
when we only had object based callbacks.  It was put back in when we
added class based callbacks.

But a setup hook will not help you here either, since it is called
during 'new' as well.  The reason I left off the setup hook is because
you can do everything you need to without it.  The init phase happens
immediately before setup is called, and the prerun phase gets called
pretty much right afterward (during the run phase).

So I never saw the use for a setup hook.  It was one of those ones
that never looked like a hook to me.  It is really in place for
overriding in your subclasses.  Of course since most of those reasons
are opinion, you are welcome to disagree and implement a setup hook. 
It won't affect me negatively, so I am not against it.

I think what you need to do to add extra runmodes is to set them in a
class based init callback.  That is what I do.  Is there really any
time where you selectively want an extra runmode based on the object
(are you checking PARAMs or something)?  Shouldn't you always want
those runmodes available?

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to