[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: key handlers
- To: email@example.com
- Subject: Re: key handlers
- From: firstname.lastname@example.org
- Date: Wed, 10 Jun 1992 11:53:32 -0600
>I have a problem with the way enter/exit-key-handler are called by MCL. My
>understanding is that they are useful for validating text entry, and I would
>expect the following behaviour:
>- When opening the dialog, call enter for the selected text item
>- When selecting another text item, call exit on the current one, then enter
>on the new one.
>- When closing the dialog, call exit on the current text item.
>This is not what I observe. The first two points are correct, but not the last
>one. What I see when the dialog is closed is this:
>+ If the current text item is the last one, do nothing
>+ Else call exit on the current item
> + Then for all items after the current one, expect the last
> + Call enter
> + Call exit
> + For the last item, call enter (but not exit)
>The effect is that if the current item is not the last, the items after it
>(except the last) are validated unnecessarily, and if the current item is the
>last one, it is not validated at all. Does not seem very useful to me.
>BTW, this is with 2.0f2.
This is caused by [I believe] by the actual removal of the editable-text
sub-views, in a linear order. Removal of a key-handle from its container
causes it to set-current-key-handler to the next [sub-view order]
A before method to window-close to set the current-key-handler to nil
should take care of this.
"TANSTAAFL" Rich email@example.com