mouseDoubleDown Problems
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 113
- Joined: Mon Apr 30, 2007 3:33 pm
- Location: Dalton, Ohio
mouseDoubleDown Problems
Greeting All,
I am updating a program that I originally wrote using Revolution 2.2.1.
In a list field, a mouseDoubleDown first sends a mouseUp and then the mouseDoubleDown.
Under 2.7.4, it is sending a mouseUp, a mousedoubledown, and then another mouseUp. This is causing problems.
Does anyone know how to get around this problem?
Thanks,
John Miller
I am updating a program that I originally wrote using Revolution 2.2.1.
In a list field, a mouseDoubleDown first sends a mouseUp and then the mouseDoubleDown.
Under 2.7.4, it is sending a mouseUp, a mousedoubledown, and then another mouseUp. This is causing problems.
Does anyone know how to get around this problem?
Thanks,
John Miller
Hi John,
A similar problem has been reported to the QC already. You might want to post a comment.
http://quality.runrev.com/qacenter/show_bug.cgi?id=4610
If you comment on the bug, it might be helpful if you added a more elaborate explanation together with your scripts.
Best,
Mark
A similar problem has been reported to the QC already. You might want to post a comment.
http://quality.runrev.com/qacenter/show_bug.cgi?id=4610
If you comment on the bug, it might be helpful if you added a more elaborate explanation together with your scripts.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
MouseDoubleDown Problems
On OSX 10.4.9 I also noticed that if you doubleckick too fast, or as fast as you would usually do on any application, no MouseDoubleDown (or MouseDoubleUp) get sent. You must do it slowly in order to work (or you get just down and up).
Is there a way to solve this problem ?
Regards
Is there a way to solve this problem ?
Regards
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Are you sure you want mouseDoubleDown rather than mouseDoubleUp?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
It does not really matter... I've put MouseDoubleUp with the same result and I dont see the differences between the two (the docs does not mention any differences...).
One result I've obtained, is putting a "wait 100 milliseconds with messages" on the mouseDown and checking the statements called by the MouseDown for a mouse up.
If the mouse is up then exit mousedown
In this wait the MouseDoubleUp (or Down) answers right away perhaps because it does not follow all the lines called by the mousedown.
I may have resolved it.
One result I've obtained, is putting a "wait 100 milliseconds with messages" on the mouseDown and checking the statements called by the MouseDown for a mouse up.
If the mouse is up then exit mousedown
In this wait the MouseDoubleUp (or Down) answers right away perhaps because it does not follow all the lines called by the mousedown.
I may have resolved it.
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
It just might. While I've only been working with this language for 12 years, in that short time I've helped a few people find acceptable workarounds for things not too different from this.trevix wrote:It does not really matter...
Could I trouble you to describe what it is your UI does?
And how closely does your setup match the one described in the recipe for the above-referenced bug report?
And for the others here: Why do you suppose that bug report has zero votes? Did the original author find a workaround? Is the circumstance needed to replicate so very specific that it doesn't affect many people?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
MouseDoubleDown ProblemsLet'see if I can explain:
Let'see if I can explain:
I'm making a classic calendar, where appointment rettangles (made with fields), strech vertically on the hours and are positioned on the days of the week.
- When I doubleclick the field, it opens up a dialog with the details of the appointement.
- When I hold down the mouse on the field, I can drag it around to reposition it on the week.
What it appens (I think) is that if I double click at normal speed (my normal speed), the script first follows the MouseUp, then the MouseDown (I know...it is strange, should be reverse) then it looks like is too late to catch the DoubleClick...so it just do another MouseUp and mouseDown(I've tracked it). This does not happen if I doubleClick slowly (it tracks as a Up, Down and Double).
I must say that each MouseUp and MouseDown on the field, continue on the stack with long script. That's why I tried to stop them putting on the MouseDown script a "if the mouse is up then exit mousedown".
My feeling is that the MouseDoubleUp should reset whatever came before...
Hope I was clear. Thanks for any help.
Trevix
I'm making a classic calendar, where appointment rettangles (made with fields), strech vertically on the hours and are positioned on the days of the week.
- When I doubleclick the field, it opens up a dialog with the details of the appointement.
- When I hold down the mouse on the field, I can drag it around to reposition it on the week.
What it appens (I think) is that if I double click at normal speed (my normal speed), the script first follows the MouseUp, then the MouseDown (I know...it is strange, should be reverse) then it looks like is too late to catch the DoubleClick...so it just do another MouseUp and mouseDown(I've tracked it). This does not happen if I doubleClick slowly (it tracks as a Up, Down and Double).
I must say that each MouseUp and MouseDown on the field, continue on the stack with long script. That's why I tried to stop them putting on the MouseDown script a "if the mouse is up then exit mousedown".
My feeling is that the MouseDoubleUp should reset whatever came before...
Hope I was clear. Thanks for any help.
Trevix
Trevix,
Are you saying that if you double-click, both the mouseDoubleClick and the mouseUp messages are sent?
This shouldn't happen according to the docs:
"If the click is the second click of a double click, the mouseDoubleUp message is sent instead of mouseUp."
However, it does happen and I believe it should be fixed. You might want to vote for (or maybe I should say against) this bug:
http://quality.runrev.com/qacenter/show_bug.cgi?id=3567
Best,
Mark
Are you saying that if you double-click, both the mouseDoubleClick and the mouseUp messages are sent?
This shouldn't happen according to the docs:
"If the click is the second click of a double click, the mouseDoubleUp message is sent instead of mouseUp."
However, it does happen and I believe it should be fixed. You might want to vote for (or maybe I should say against) this bug:
http://quality.runrev.com/qacenter/show_bug.cgi?id=3567
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Exactely.
Make a locked field with this:
Then put this in the stack:
Interesting enough, if you use the 1 seconds delay, no doubleclick get sent anymore. This should not be because if you have a complex enough MouseDown script, the MouseDoubleUp behaves randomly.
I'm not sure I understand the "quality control center" stuff enough to post anything.
Anyway the MouseDoubleDown should flush everything from the mouseDown and MouseUp...My 50 milliseconds delay is not a great solution since you feel the delay on the mouse...
Regards
Trevix
Make a locked field with this:
Code: Select all
on mousedown
FromMouseDown
end mousedown
on mouseup
FromMouseup
end mouseup
on MouseDoubleUp
FromMouseDoubleUp
end MouseDoubleUp
Code: Select all
on FromMousedown
--wait 1 seconds with messages
put "FromMousedown" & return after msg
end FromMousedown
on FromMouseup
--wait 1 seconds with messages
put "FromMouseup" & return after msg
end FromMouseup
on FromMouseDoubleUp
--wait 1 seconds with messages
put "MouseDoubleUp" & return after msg
end FromMouseDoubleUp
I'm not sure I understand the "quality control center" stuff enough to post anything.
Anyway the MouseDoubleDown should flush everything from the mouseDown and MouseUp...My 50 milliseconds delay is not a great solution since you feel the delay on the mouse...
Regards
Trevix
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
If you could create the simplest possible example stack which illustrates this issue, I'd be happy to dig into it and see if I could coerce it to do what you want.
In the meantime, if all else fails there may be a way to use the flushEvents function to purge unwanted messages....
In the meantime, if all else fails there may be a way to use the flushEvents function to purge unwanted messages....
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
MouseDoubleDown Problems
You are very kind. My stack is complex and it's hard to simplify it. But the main point is that MouseDoubleDown does not work consistently...
try this:
on a locked fld:
on the stack:
You'll see that the FlushEvents("all") does nothing and that intercepting ("if the mouse is up...") MouseDown or MouseUp, makes them no to work.
The point is that there should be a simple way to stop mouseDown and MouseUp script when you doubleclick...
try this:
on a locked fld:
Code: Select all
on mousedown
FromMouseDown
end mousedown
on mouseup
FromMouseup
end mouseup
on MouseDoubleUp
--get flushEvents("all")
FromMouseDoubleUp
end MouseDoubleUp
Code: Select all
on FromMousedown
repeat with i= 1 to 1000000
put "FromMousedown" & return into FromClick
--if the mouse is up then exit repeat
end repeat
put FromClick after msg
end FromMousedown
on FromMouseup
repeat with i= 1 to 1000000
put "FromMouseup" & return into FromClick
--if the mouse is down then exit repeat
end repeat
put FromClick after msg
end FromMouseup
on FromMouseDoubleUp
repeat with i= 1 to 1000
put "MouseDoubleUp" & return into FromClick
end repeat
put FromClick after msg
end FromMouseDoubleUp
The point is that there should be a simple way to stop mouseDown and MouseUp script when you doubleclick...
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
> The point is that there should be a simple way to stop mouseDown
> and MouseUp script when you doubleclick...
Thanks for the explanation.
The problem, if we can call it that, is that the mouse does go down and up prior to a mouseDoubleUp, so the messages appear to be firing correctly.
In my own UIs I generally want the mouseUp in addition to mouseDoubleUp. What is your UI doing that makes this problematic?
> and MouseUp script when you doubleclick...
Thanks for the explanation.
The problem, if we can call it that, is that the mouse does go down and up prior to a mouseDoubleUp, so the messages appear to be firing correctly.
In my own UIs I generally want the mouseUp in addition to mouseDoubleUp. What is your UI doing that makes this problematic?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Since you mention that your mouseDown/mouseUp scripts are long and complex it may be possible that the scripts haven't finished running yet and that is interfering with the mouseDoubleUp message. I'm just guessing here as I don't know if that is possible.
In any case, what if you tried something like this:
The idea here is that you end up executing the scripts directly after the engine events mouseUp/mouseDown. Perhaps this will allow mouseDoubleUp to get called correctly each time.
In any case, what if you tried something like this:
Code: Select all
on mouseUp
send "PerformLongAndComplexHandler" to me in 0 seconds
end mouseUp
on mouseDown
send "PerformOtherLongAndComplexHandler" to me in 0 seconds
end mouseDown
on mouseDoubleUp
send "PerformDoubleUpAction" to me in 0 seconds
end mouseDoubleUp
The idea here is that you end up executing the scripts directly after the engine events mouseUp/mouseDown. Perhaps this will allow mouseDoubleUp to get called correctly each time.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder