mouseEnter message on new stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
mouseEnter message on new stack
Just want to check i am not seeing a bug here.. Or if i am negleting to consider something else.
To reproduce:
1: open livecode
2: open message watcher
3: create new mainstack
4: switch to live view
And now watch the message watcher while moving the mouse in and out of the stack
I am seeing all the messages i expect except "mouseEnter" ....?
I have removed my preferences and re-installed livecode, but i still don't see a mouseEnter message.
I can continue to test further bu adding an object.. say a button to the card.. i do see mouseEnter and leave message on the button, but just not the card or stack...?
To reproduce:
1: open livecode
2: open message watcher
3: create new mainstack
4: switch to live view
And now watch the message watcher while moving the mouse in and out of the stack
I am seeing all the messages i expect except "mouseEnter" ....?
I have removed my preferences and re-installed livecode, but i still don't see a mouseEnter message.
I can continue to test further bu adding an object.. say a button to the card.. i do see mouseEnter and leave message on the button, but just not the card or stack...?
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
-
- Posts: 49
- Joined: Sat Jun 16, 2012 7:57 pm
Re: mouseEnter message on new stack
Gary,
Same behavior here.
Put a button on your stack and you will see the mouseEnter message for the btn (oops, already done).
The Dictionary is not really explicit on this point, but it only refers to "objects" and more specifically to "controls". As a stack is not a control, it may be expected behavior.
BTW, the mouseLeave entry has the same redaction, and the mouseLeave message appears.
If you put this in the stack script:
So the message watcher is right.
Now, the big question: is it a bug or a feature?
Same behavior here.
Put a button on your stack and you will see the mouseEnter message for the btn (oops, already done).
The Dictionary is not really explicit on this point, but it only refers to "objects" and more specifically to "controls". As a stack is not a control, it may be expected behavior.
BTW, the mouseLeave entry has the same redaction, and the mouseLeave message appears.
If you put this in the stack script:
you'll see the stack receives no mouseEnter message.on mouseLeave
answer "mouseLeave"
end mouseLeave
on mouseEnter
answer "mouseEnter"
end mouseEnter
So the message watcher is right.
Now, the big question: is it a bug or a feature?
Best regards,
Didier
Didier
Re: mouseEnter message on new stack
Thank's for confirming that.. At least i now know it's not specific to something here.
I would really like the message to be received by the stack and or card as well.
It seems strange to say the least, that the stack and the card receive the mouseLeave message but not the enter one.
Maybe worth shouting this out to them, just in case there unaware.
Thank's again.
I would really like the message to be received by the stack and or card as well.
It seems strange to say the least, that the stack and the card receive the mouseLeave message but not the enter one.
Maybe worth shouting this out to them, just in case there unaware.
Thank's again.
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: mouseEnter message on new stack
Doobox...
What are you trying to achieve ?... and if it is not a rude question why ?
I have attached a stack that will do what you want... the scripts are in the stack script and in the script of the graphic..
I hope it helps...
be well
Dixie
What are you trying to achieve ?... and if it is not a rude question why ?
I have attached a stack that will do what you want... the scripts are in the stack script and in the script of the graphic..
I hope it helps...
be well
Dixie
- Attachments
-
- In&Out.zip
- (1.11 KiB) Downloaded 269 times
Re: mouseEnter message on new stack
Hi,
Same result for me with LC 5.02 and 5.5.1
Best
Jean-Marc
Same result for me with LC 5.02 and 5.5.1
Best
Jean-Marc
https://alternatic.ch
Re: mouseEnter message on new stack
mouseEnter and mouseLeave are not supported in the stack and card objects.. you could write an external to provide the functionality or you can just use the code provided by Dixie
Re: mouseEnter message on new stack
Thank's Dixie.. I can get round it if i need to. And was not really needing the functionality anyway at this point, for anything in particular.
I just stumbled across the fact, when i was randomly testing a few ideas.
What really threw me is the fact you get a mouseLeave message. One would expect they would go hand in hand.
I just stumbled across the fact, when i was randomly testing a few ideas.
What really threw me is the fact you get a mouseLeave message. One would expect they would go hand in hand.
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
-
- VIP Livecode Opensource Backer
- Posts: 153
- Joined: Wed Aug 26, 2009 7:42 pm
- Contact:
Re: mouseEnter message on new stack
The truly annoying thing is that mouseEnter and mouseLeave ARE sent to the card UNDER Windows. Only under OSX is mouseEnter not sent. That seems like a BUG to me.
Paul Dupuis
Researchware, Inc.
Researchware, Inc.
-
- Livecode Opensource Backer
- Posts: 10102
- Joined: Fri Feb 19, 2010 10:17 am
Re: mouseEnter message on new stack
I have just been playing around with this [on Linux], and set up a fairly moronic stack
with 2 flds "inStack" and "inCard" and the following scripts:
in the stack:
on mouseEnter
put "IN" into fld "inStack"
end mouseEnter
on mouseLeave
put empty into fld "inStack"
end mouseLeave
and in the card:
on mouseEnter
put "IN" into fld "inCard"
end mouseEnter
on mouseLeave
put empty into fld "inCard"
end mouseLeave
AND the card detects mouseEnter, but the stack
does not.
SO; the work around is to have mouseEnter scripts in every card
with 2 flds "inStack" and "inCard" and the following scripts:
in the stack:
on mouseEnter
put "IN" into fld "inStack"
end mouseEnter
on mouseLeave
put empty into fld "inStack"
end mouseLeave
and in the card:
on mouseEnter
put "IN" into fld "inCard"
end mouseEnter
on mouseLeave
put empty into fld "inCard"
end mouseLeave
AND the card detects mouseEnter, but the stack
does not.
SO; the work around is to have mouseEnter scripts in every card

- Attachments
-
- INout.zip
- Rocket Science
- (507 Bytes) Downloaded 230 times
-
- VIP Livecode Opensource Backer
- Posts: 153
- Joined: Wed Aug 26, 2009 7:42 pm
- Contact:
Re: mouseEnter message on new stack
The reason your stack is not getting the mouseEnter or mouseLeave at the stack is because the handler in your card script traps them. Many messages (like resizeStack) are actually sent to the current card and if no handler is present to handle them, they pass through to the stack script. If a handler is present, the message is never passed to the stack script unless the handler specifically includes a "pass mouseEnter"
You've help confirm that on Linux the mouseEnter message is sent to the current card as it is on Windows. Only under OSX (only tested 10.8 and 10.9) is it not.
You've help confirm that on Linux the mouseEnter message is sent to the current card as it is on Windows. Only under OSX (only tested 10.8 and 10.9) is it not.
Paul Dupuis
Researchware, Inc.
Researchware, Inc.
-
- Livecode Opensource Backer
- Posts: 10102
- Joined: Fri Feb 19, 2010 10:17 am
Re: mouseEnter message on new stack
Yes!
If I modify my stack by removing the cardScript and keep the stackScript:
on mouseEnter
put "IN" into fld "inStack"
end mouseEnter
on mouseLeave
put empty into fld "inStack"
end mouseLeave
The mouseEnter IS detected.
If I modify my stack by removing the cardScript and keep the stackScript:
on mouseEnter
put "IN" into fld "inStack"
end mouseEnter
on mouseLeave
put empty into fld "inStack"
end mouseLeave
The mouseEnter IS detected.