Intermittent Performance

Mark Talluto revlists at canelasoftware.com
Wed May 19 16:22:16 EDT 2004


On May 19, 2004, at 12:36 PM, John Dixon wrote:

> 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 I click on the button, a
> character is deleted, but the second time I click on the button then 
> there
> is no response, until I click for 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
>

Hi John,

Sounds like you are clicking too fast.  If you would like the user to 
be able to click faster then now, you should look up 
"doubleclickinterval" in the TS dictionary.  When I tested your script, 
if I clicked the button slowly (every few seconds) it worked just fine.

You may also simplify your script by exchanging the last two put lines 
with:
delete the last char of field "theWord"

-- 
Best regards,
Mark Talluto
http://www.canelasoftware.com


More information about the use-livecode mailing list