Quantum tunneling in LiveCode

Paul Hibbert paul at livecode.org
Mon Mar 2 17:50:03 EST 2015


That still makes sense to me, because the group is placed on this card and the button belongs to the group, so I would expect the message path to take the normal route, i.e. Button, Group, Card, Stack, why would it not?

But when clicking on the card, the background is picking up the stray mouseUp message passed on from the card before it reaches the stack.

Maybe my logic is questionable, but the User Guide seems to agree…

P.131 - 5.3.9 Groups, Backgrounds & The Message Path

Paul

> On Mar 2, 2015, at 2:18 PM, Peter Haworth <pete at lcsql.com> wrote:
> 
> Right, but if you click the button, the group comes before the card not
> after the card, I think that's the point of interest.
> 
> On Mon, Mar 2, 2015 at 1:38 PM <dunbarx at aol.com> wrote:
> 
>> Hi.
>> 
>> 
>> What Paul said.
>> 
>> 
>> This would be easy for old HC people, since the background group is like a
>> HC backGround, and is higher in the hierarchy (sorry, Jacque) than a card.
>> 
>> 
>> Craig
>> 
>> 
>> 
>> -----Original Message-----
>> From: Paul Hibbert <paul at livecode.org>
>> To: How to use LiveCode <use-livecode at lists.runrev.com>
>> Sent: Mon, Mar 2, 2015 4:34 pm
>> Subject: Re: Quantum tunneling in LiveCode
>> 
>> 
>> Because you set the backgroundBehavior of the "strange group" to true, it's
>> effectively after the card in the message path. There's a good explanation
>> and
>> diagram in chapter 5.2.3 (p.127-9) of the user guide.
>> 
>> HTH
>> 
>> Paul
>> 
>> 
>>> On Mar 2, 2015, at 1:07 PM, stgoldberg at aol.com wrote:
>>> 
>>> In quantum mechanics something can be in more than one place at once.  A
>> paradox of sorts seems to occur in the message chain with groups in
>> LiveCode.
>> Try this:
>>> 
>>> 
>>> 1.  Place a button on a card.
>>> 2.  Make the button a group. Set the group's backgroundBehavior to true.
>>> 3.  Place the following script in the button:
>>> 
>>> 
>>> on mouseUp
>>> answer "I am a button"
>>> pass mouseUp
>>> end mouseUp
>>> 
>>> 
>>> 4.  Place the following script in the group:
>>> 
>>> 
>>> on mouseUp
>>> answer "I am a strange group"
>>> pass mouseUp
>>> end mouseUp
>>> 
>>> 
>>> 5.  On the card script write:
>>> 
>>> 
>>> on mouseUp
>>> answer "I am a card"
>>> pass mouseUp
>>> end mouseUp
>>> 
>>> 
>>> 6.  In the stack script write:
>>> 
>>> 
>>> on mouseUp
>>> answer "I am a stack"
>>> end mouseUp
>>> 
>>> 
>>> 
>>> 
>>> 7. Now click on the button.  You get the sequence:
>>> I am a button --> I am a strange group --> I am a card --> I am a stack
>>> 
>>> 
>>> 8.  Now click on the card.  You get:
>>> I am a card --> I am a strange group
>>> 
>>> 
>>> Where is the strange group, before or after the card?
>>> 
>>> 
>>> Stephen Goldberg
>>> www.medmaster.net
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> 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
>> 
>> 
>> _______________________________________________
>> 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