On 7/5/05, Cees Hek <[EMAIL PROTECTED]> wrote: > 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.
I've always seen setup() as a post-hook for cgiapp_init() -- to further customize an application subclass. Since cgiapp_init() already has hooks available, anything you want your application plugin/class to handle in setup can easily be done as a cgiapp_init() hook. For these reasons, I have to agree with Cees that setup() doesn't seem like a likely candidate for a hook. -- Matthew Weier O'Phinney [EMAIL PROTECTED] http://weierophinney.net/matthew/ --------------------------------------------------------------------- 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]
