On Fri, Sep 23, 2005 at 04:33:32PM +0000, Mark Stosberg wrote:
> On 2005-09-23, Evan A. Zacks <[EMAIL PROTECTED]> wrote:
> >
> > If that form field is set (by the browser), then pdf conversion
> > will take place. Otherwise, the postrun callback won't do
> > anything. This allows the programmer to use the plugin without
> > needing to explicitly call the pdf output conversion method.
>
> I can see this a useful option when you want an easy to offer users the
> ability to print the run mode as a PDF.
>
> A more direct an explicit way to generate PDFs should still be provided.
Right. The plugin will still allow the pdf_output() method to be
exported. This is useful both for folks who want to manually
generate PDFs and for those using older versions of
CGI::Application where the plugin won't be able to register the
postrun callback automatically.
I think these two options (form parameter to request pdf output,
manual pdf generation) can coexist. The postrun callback will be
a wrapper that checks for the existence of the form parameter
before passing control to the pdf_output() method. The user,
however, will invoke pdf_output() directly.
> > Another related suggestion was to allow the user to specify a
> > list of runmodes where pdf output would be allowed (or
> > disallowed). Does anyone have a preference for which would be
> > better (or if we should have both)?
>
> If this would be like "run_modes()" in setup, I don't like the idea,
> because it's far enough way from where the action is to cause confusion.
>
> I would rather see a subroutine attribute be used:
>
> sub display_list : Runmode, AllowPDF {
> # ....
> }
I'm still not sure whether this feature (allow/disallow pdf from
certain runmodes) is all that useful, but if others want it...
I do like the use of attributes rather than having the
user send a table to a config() method or similar.
Thanks for the ideas.
-E
---------------------------------------------------------------------
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]