unexpected behavior 'on mouseup'

Jim Ault JimAultWins at yahoo.com
Wed Nov 29 13:56:38 EST 2006


On 11/29/06 7:14 AM, "Ken Ray" <kray at sonsothunder.com> wrote:
> On 11/28/06 6:27 PM, "Jim Ault" <JimAultWins at yahoo.com> wrote:
> 
>> Why does the card script run when clicking the button that contains the
>> script:
>> on mouseUp
>> 
>> end mouseUp
> 
> Because in actuality, it *doesn't* contain the script. The new button has no
> script, but when you open the script in the Script Editor, Rev adds the "on
> mouseUp ... end mouseUp" for your (theoretical) convenience.
> 
> So if you cancel out of the Script Editor and don't Apply, the button
> remains with no script in it, so the message passed through the hierarchy.

I guess the confusing part is that the Apply button is dim and unavailable
(as well as the Revert) , so it appears as though the script has already
been applied.  In order to have the button be a trap-mouse-up button, you
need to type something in the script, even if it is a single space, then you
can click the Apply button.

Now that I know, I know.

Thanks for the clarification to those who chimed in :-)

Jim Ault
Las Vegas





More information about the use-livecode mailing list