Hi.
The "target" tells LC which control received a message. If you had a script in 
the card, something like:
on mouseUp
set the bordercolor of the Target to "orange"
set the showBorder of the target to "true"
--- do somethingend mouseUp
You would not only have quotes in places you ought to, but need only that one 
handler in your stack.
Note that oftentimes you do not want EVERY button to react that way. There are 
two ways around that.
1- Trap "mouseUp" in the offending button.2- Set a property of some sort in 
those buttons, such that (pseudo):
on mouseUp
if the name of the target has some nice property thenset the bordercolor of the 
Target to "orange"...
Craig

-----Original Message-----
From: General 2018 via use-livecode <use-livecode@lists.runrev.com>
To: use-livecode@lists.runrev.com <use-livecode@lists.runrev.com>
Cc: General 2018 <general.2...@outlook.com>
Sent: Sat, Oct 5, 2019 12:57 pm
Subject: Button scripts

Hi ,

Have many buttons that do different operations , each one has the following 
script :-

Is the script required for each button and is the use of flush correct ?

on mouseUp
set the bordercolor of me to orange
set showBorder of me to true
--- do something
get flushEvents("mouseUp")
end mouseUp



on mouseleave
set showBorder of me to false
get flushEvents("mouseleave")
end mouseleave


Regards
Camm
_______________________________________________
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
  • Button scripts General 2018 via use-livecode
    • Re: Button scripts dunbarx--- via use-livecode

Reply via email to