Intermittent performance
Klaus Major
klaus at major-k.de
Tue May 18 12:28:03 EDT 2004
Hi John,
> I have a field "theWord", into which letters are added. If a mistake
> is made
> upon entry, the user is able to delete the last character of the field
> by
> clicking on a button that contains the script found below... or by
> employing
> the option key at the same time the user can clear the whole field.
>
> The problem I have is that the first time the user clicks on the
> field, a
> character is deleted. The second time a user clicks on the field then
> there
> is no response, until the user clicks a third time.
>
> I must point out that the cursor does not leave the rect of the button
> during these clicks.
>
> on mouseUp
> if the optionKey is "down" then
> put empty into fld "theWord"
> exit mouseUp
> end if
>
> put the number of chars of fld "theWord" into charCount
> put char 1 to (charCount -1) of fld "theWord" into fld "theWord"
> end mouseUp
>
> Any ideas why it does not work everytime ?
I tried with this script (is a bit shorter, lazy moi :-) and it worked
fine...
Everytime and with a fast response!
OK, "monkey-clicking" may drop one "mouseup" or two, but in general no
probs..
on mouseUp
if the optionKey is "down" then
put empty into fld "theWord"
else
delete char -1 of fld "theWord"
end if
end mouseUp
> regards
>
> John Dixon
Regards
Klaus Major
klaus at major-k.de
www.major-k.de
More information about the use-livecode
mailing list