unexpected behavior 'on mouseup'

John Vokey vokey at uleth.ca
Tue Nov 28 22:01:53 EST 2006


Jim wrote:

> Do four simple steps:
>
> [1] Make a new mainstack
> [2] set the card script to
>
> on mouseUp
>    put the long id of the target && the seconds
> end mouseUp
>
> [3] Make a new button
> [4] Choose Browse mode
> ---
> Why does the card script run when clicking the button that contains  
> the
> script:
>
> on mouseUp
>
> end mouseUp
>
> It is as if the button has 'pass mouseUp' implied.
> Now add any character to the button script, such as a space, click  
> apply,
> and no message is passed (but the script is the same)
>
> Not a show-stopper, but fooled me when using a transparent button  
> to block
> mouse clicks.  Perhaps this is already bugzilla'd, or is expected  
> behavior.
>
> Jim Ault
> Las Vegas

The button *does* pass mouseUp because it contains *no script* at  
all!  The on mouseUp handler is added for your convenience, but if  
you don't edit the script in anyway, it is deleted when the editor  
window is closed
--
Please avoid sending me Word or PowerPoint attachments.
See <http://www.gnu.org/philosophy/no-word-attachments.html>

-Dr. John R. Vokey







More information about the use-livecode mailing list