On Fri, 19 Oct 2001 "Raymond E. Griffith" <[EMAIL PROTECTED]> wrote:

> I have discovered something that, while not a bug, has proved to be
> inconvenient.
> 
> I have in certain fields on a card an exitfield handler. The problem comes
> when going to the next card.
> 
> The problem occurs when I click on a button that checks out whether certain
> fields have been filled in. It makes the determination. If a field is not
> filled in, it stops the process of going to the next card. If all required
> fields are filled in, then I go to the next card.
> 
> But I receive an error message. The exitfield handler in a field (the
> unlocked field with the lowest layer) appears to be activated by going to
> the next card. What is worse is that the exitfield handler is being handled
> *after* going to the next card, so MC has its references mixed up.
> 
> Generally speaking, I would expect all exitfield or closefield handlers to
> be handled before the card closes.

They are, at least in my testing: The closeCard message *is* sent
after the closeField message.

> If anyone has a light on the situation, I would appreciate it.

Note that if you do "go card x", you *will* end up on card x,
regardless of what the closeField or exitField handlers do.  If you
want to force the field validation to occur before the "go" is
executed, you'll need to focus some other control and then check some
sort of status variable or property to see if the check succeeded
before doing the "go".  The command "focus me" in a button script is
the easiest way to do the first part, but you're on your own for the
status variable part.

But if you ask me, doing validation on closeField is bad technique and
results in abominations like the MacOS "memory" dialog box (where you
usually end up with an error message when trying to increase the
partition because it focuses the "minimum" field before the
"preferred" field, one of my top 10 examples of bad UI design,
dragging a disk to the trash to eject being #1 on that list).
Instead, I'd recommend doing validation on the entire form just before
going to another one.  Easier for you for you to develop, and easier
and more convenient for the user.
  Regards,
    Scott

> Thanks,
> 
> Raymond

********************************************************
Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...



Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to