Message Path and Groups Oddity

Ender Nafi Elekcioglu endernafi at gmail.com
Sat Oct 19 10:55:47 EDT 2013


Craig hi,

You're right; that works better than "setting the rect" method; thanks.
But it's not suitable for my project(s)
because the stack still can't get the *mouseUp* message
and I need it.


Best,

~ Ender

On October 19, 2013 at 2:41:40 AM, dunbarx at aol.com (dunbarx at aol.com) wrote:

Jacque is a national treasure.


I am old fashioned, and suggest you could:


on mouseDown
hide thatFirstGroup
wait until the mouse is up
show thatFirstGroup
end mouseDpwn


Not tested, as I am driving, but should work. Any workaround that works is valid, and I know how "wait" has gotten marginalized with these fancy new xTalks, but at least the code stays in one place, and so do the groups.


Craig Newman




-----Original Message-----
From: Ender Nafi Elekcioglu <endernafi at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>; J. Landman Gay <jacque at hyperactivesw.com>
Sent: Fri, Oct 18, 2013 3:22 pm
Subject: Re: Message Path and Groups Oddity


Jacque hi,

You don't know this but you actually helped me countless times.
I always read your replies, which I've learned much from, in this list and  
forum.
Can't thank you enough…

Regarding this particular issue;
You were right about *mouseRelease*.
What I understand is, the mouse events are strictly tied to the first responder  
{original object}.
The screaming voice in my head as "WHY, GOD, WHY?" shut up, finally.


Unfortunately, it isn't a solution for my situation.
*mouseRelease* is sent right after the group's hidden  
and I end up with a flash effect, disappearing and appearing of the view  
instantly.


But, acknowledging the real reason thanks to you; I could find a workaround:

_on mouseDown
___set the rect of group "frontGroup" to 0,0,1,1
_end mouseDown

_on mouseUp
___set the rect of group "frontGroup" to the rect of this card
_end mouseUp


Since the first responder {original object} is not hidden, is still there;
stack can receive the mouseUp message.


Thanks a bunch…


Best,

~ Ender


On October 18, 2013 at 5:32:13 PM, J. Landman Gay (jacque at hyperactivesw.com)  
wrote:

If the original object is no longer visible when the mouse goes up, no mouseUp  
is sent. Instead a mouseRelease is sent. Change the mouseUp handler to  
mouseRelease and it should work.  

Ender Nafi Elekcioglu <endernafi at gmail.com> wrote:
>Hi all,
>
>I have a simple stack.
>One card, two groups.
>Each group has several sample controls {a couple of empty buttons and
>labels}
>and each group's rect is same as the card's rect.
>One in the background and one in the foreground.
>
>This is the only code embedded and it's in the stack's script:
>
>_on mouseDown
>___hide group "frontGroup" of this card
>_end mouseDown
>
>_on mouseUp
>___show group "frontGroup" of this card
>_end mouseUp
>
>As you can guess, that doesn't work.
>On first mouseDown group disappears but releasing the mouse {following
>mouseUp} doesn't show the group.
>It requires a second click.
>
>
>This works:
>
>_on mouseDown
>___disable group "backGroup" of this card
>___hide group "frontGroup" of this card
>_end mouseDown
>
>_on mouseUp
>___show group "frontGroup" of this card
>___enable group "backGroup" of this card
>_end mouseUp
>
>
>Does anyone have any idea why?
>  
>Btw, I cannot disable the backGroup, I need it.
>The backGroup isn't actually a backgroundGroup, I mean its
>*backgroundBehaviour* isn't checked;  
>it'll be different across the cards on the actual app.
>
>Why does it block the message path?
>
>
>Thanks for any help…
>
>
>~ Ender Nafi
>_______________________________________________
>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

--  
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com

_______________________________________________
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