Groups in the message path: Trapping Mouseup

dunbarx at aol.com dunbarx at aol.com
Sun Dec 8 15:24:56 EST 2019


Hi.
It is hard for me to understand without more info about the case statements. But when you have this:
# I click on button "starWidget"
-- nothing happens…hmm, no errors either…
Do you really mean nothing, not even that the:
   put the short name of the target

does not fire?
Craig

-----Original Message-----
From: Sannyasin Brahmanathaswami via use-livecode <use-livecode at lists.runrev.com>
To: How LiveCode <use-livecode at lists.runrev.com>
Cc: Sannyasin Brahmanathaswami <brahma at hindu.org>
Sent: Sun, Dec 8, 2019 2:56 pm
Subject: Groups in the message path: Trapping Mouseup 

I think this a old problem that is re-surfacing. Or else it is known….

9.6 dp1, in the message path different independent groups are not encapsulated.

button "starWidget"
-- has no script
-- is not a part of any group

Stack script:

on mouseup
          put the short name of the target
          put the short name of the target into tTarget
          switch tTarget
                  case(s) # various button names
                  # consolidate all UI actions that not part of a group
                  # to the stack script
          end switch
end mouseup

# the card are several groups,
# each with its own mouse handlers

# I click on button "starWidget"
-- nothing happens…hmm, no errors either…
# start profiling scripts (new trick I found)
# click on button "starWidget"
# stop profiling scripts:
          # Voila! the mouseup was trapped by one the other groups, as if they were in the message path.

Is there any way around this? Meanwhile I have to plug into every button explicit handlers. Tedious, make debugging painful…

BR







_______________________________________________
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