before vs on in behavior scripts

Scott Rossi scott at tactilemedia.com
Tue Mar 18 22:54:05 EDT 2014


I didn't realize it until just now, but this is the order of events:

before mouseUp
   answer "A"
end mouseUp

on mouseUp
   answer "B"
end mouseUp

after mouseUp
   answer "C"
end mouseUp


Really cool stuff for custom behaviors, but I'm still trying to come up
with a nifty use for the "after" event.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 3/18/14 7:44 PM, "Scott Rossi" <scott at tactilemedia.com> wrote:

>How are you determining that "on" isn't working?  Is it possible that "on"
>is executing immediately after "before"?
>
>Placing the following in a behavior script works fine here:
>
>before mouseUp
>   answer "A"
>end mouseUp
>
>on mouseUp
>   answer "B"
>end mouseUp
>
>
>If you need some kind of alternate behavior to take place after "before"
>that isn't "on", you might consider "after".  I know, it's a lot of
>prepositions ...
>
>Regards,
>
>Scott Rossi
>Creative Director
>Tactile Media, UX/UI Design
>
>
>
>
>On 3/18/14 4:33 PM, "Devin Asay" <devin_asay at byu.edu> wrote:
>
>>All,
>>
>>If a button has a behavior attached to it, and the behavior script has a
>>'before mouseUp' handler, can the behavior script also have a 'on
>>mouseUp' handler?
>>
>>I could swear the answer was yes; I thought I had done that before, but
>>now when I try it, it doesn't work. (In LC 6.5.x. and 6.6.0RC2). Instead
>>I have to put the 'in mouseUp' in the button's script.
>>
>>Of course I might be completely missing the point of 'before' and 'after'
>>handlers. Wouldn't be the first time.
>>
>>Regards,
>>
>>Devin
>>
>>
>>Devin Asay
>>Office of Digital Humanities
>>Brigham Young University
>>
>>_______________________________________________
>>use-livecode mailing list
>>use-livecode at lists.runrev.com
>>Please visit this url to subscribe, unsubscribe and manage your
>>subscription preferences:
>>http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode
>






More information about the use-livecode mailing list