[ic] mv_check vs. mv_click ?
Mike Heins
mikeh@minivend.com
Sun, 6 May 2001 11:05:16 -0400
Quoting Dan B (db@cyclonehq.dnsalias.net):
> At 11:48 AM 5/5/2001 -0400, you wrote:
> >I've been playing with mv_check but I also fell on mv_click...I have
> >problems to differentiate them.
> >
> >I've been reading the doc but all i can retrieve is that mv_click "might"
> >be the same except that it will occur before...(before what?).
> >
> >I also saw in the doc somewhere they talk about mv_click but the example
> >involves an mv_check.
> >It is the last example of the "One-Click Multiple Variables" section.
> >
> >So can anyone help me clarify this?
>
> Nope. But I can tell you what I learned regarding the "when" and "before
> what":
>
> mv_click seems to happen before everything else. I.e. form values have not
> been updated to the users' browser session input. This is where you can do
> something before everything else, but *after* the user clicked. I think of
> it as just happening at the same time the page loads, but after the user
> clicks.
>
> mv_check seems to happen after everything else, but before processing (i.e.
> moving to mv_nextpage, etc.). For me, that's the time to mess with user
> inputs (which are now updated into [value ...]) and other things.
>
> BTW, the above is probably nonsensical and horribly incorrect. :-) Let me
> state, "I stand corrected" now so that I don't have to do it when Ed, CFM,
> or Mike corrects me.
Actually, you are correct. So you should "stand correct".
The best way to see what is happening is actually to look at
the subroutine "do_process" in bin/interchange -- it will show:
1. Every form action does an mv_click, which happens before
anything (except mv_form_profile in 4.7.x).
2. The form action is determined, and its subroutine pulled
from the %form_action hash.
3. If the form action calls an "update_user", then mv_check
is called at the end of that routine.
Actually, I wrote what I thought was a fair description of this
process but cannot now find it in the docs. Sigh.
--
Red Hat, Inc., 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.7621 fax 7501 <mheins@redhat.com>
Fast, reliable, cheap. Pick two and we'll talk. -- unknown