logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Splitting run mode: msg#00031

Subject: Re: Splitting run mode

----- Original Message ----- From: "Michael Peters" <mpeters@xxxxxxxxxxxxx>
To: "Jonathan Mangin" <jon.mangin@xxxxxxxxxxx>
Cc: <cgiapp@xxxxxxxxxxxxxxxxx>
Sent: Monday, February 07, 2005 3:43 PM
Subject: Re: [cgiapp] Splitting run mode


Jonathan Mangin wrote:
The docs talk about having display run modes and process run modes.
Does that mean I can split mode2 below into 2 run modes?  And how
would I call mode3 (show_template_2) with vars from process_mode_1?

sub mode1 {
  show_template_1();
}

sub mode2 {
  process_mode1();
  show_template_2();
}

If I understand correctly, I would:

sub mode1 {
  my $self = shift;
  # load and display some template
  return $tmpl->output();
}

sub mode2 {
  my $self = shift;
  # process data from mode1
  # now show it again
  return $self->mode1();
}

sub mode3 {
  my $self = shift;
  # load and display some other template
  return $tmpl->output();
}

Hope you can understand my question,

If that doesn't answer your question, then I guess I didn't understand it :)

--
Michael Peters
Developer
Plus Three, LP


I believe you understood it, though I can't do what you suggest.

mode1 asks for a uid whose profile I want to edit.
mode2 fetches the profile data and then displays the full record.

Just wondered if I could somehow split the fetch/display into
separate run modes. It's not important and I'm guessing the best
answer is "why?"

Thanks,
Jon




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





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>