[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] calling run_mode if form has 2 submit buttons


but prerun has already run for the current run mode, i guess you'd
have to decided if you need prerun run again or not.

On 5/31/05, Jonathan Mangin <suppressed> wrote:
> 
> ----- Original Message -----
> From: "Jeff MacDonald" <suppressed>
> To: "Jonathan Mangin" <suppressed>
> Cc: <suppressed>; <suppressed>
> Sent: Tuesday, May 31, 2005 10:09 AM
> Subject: Re: [cgiapp] calling run_mode if form has 2 submit buttons
> 
> 
> > How ugly might this be?
> >
> > sub run_mode {
> >    if ($selection eq "Button One") {
> >       $do_this_stuff;
> >    }
> >    if ($selection eq "Button Two") {
> >       $do_this_other_stuff;
> >    }
> > }
> 
> Perhaps a bit prettier
> 
> sub run_mode {
>   if ($selection eq 'one') {
>     return $self->other_runmode();
>   }
>   if ($selection eq 'two') {
>     return $self->somethingrunmode();
>   }
> }
> --
> Jeff MacDonald
> http://www.halifaxbudolife.ca
> 
> 
> 
> Doesn't
> 
> return $self->other_runmode();
> 
> bypass cgiapp_prerun?
> 
> -Jon
> 
> 
> 
> 
> ---------------------------------------------------------------------
> Web Archive:  http://www.mail-archive.com/suppressed/
>               http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
> To unsubscribe, e-mail: suppressed
> For additional commands, e-mail: suppressed
> 
> 


-- 
Jeff MacDonald
http://www.halifaxbudolife.ca

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


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.