Heirarchy and where the mouseUp signal is detected.

Mark Schonewille m.schonewille at economy-x-talk.com
Wed May 15 15:52:00 EDT 2013


Richmond,

You need to pass the mouseUp command on to the card.

on mouseUp
     if fld "FF" contains "dog" then
        put "cat" into fld "FF"
     else
        put "dog" into fld "FF"
     end if
     pass mouseUp
end mouseUp


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other 
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

On 5/15/2013 21:19, Richmond wrote:
> The reasons for this are probably fairly basic.
>
> I have a wee stack that contains a fld "FF" containing the text "dog",
>
> and a button "Button" containing this script:
>
> on mouseUp
>     if fld "FF" contains "dog" then
>        put "cat" into fld "FF"
>     else
>        put "dog" into fld "FF"
>        end if
> end mouseUp
>
> [sophisticated stuff it ain't]
>
> and the single card contains this script:
>
> on mouseUp
>     if the textColor of fld "FF" is "green" then
>     set the textColor of fld "FF" to "red"
> else
>     set the textColor of fld "FF" to "green"
>     end if
> end mouseUp
>
> Now, split me, but I thought that if I clicked anywhere on the card the
> cardScript would fire, including on the button,
>
> BUT, deuced inconvenient, clicking on the button only fires the
> buttonScript, and clicking anywhere on the card, outwith the button
> fires the cardScript.
>
> and I was hoping that a buttonClick would fire both the cardScript and
> the buttonScript.
>
> Does anybody know how to effect this?
>
> Richmond.
>
> _______________________________________________
> 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