Wait command weirdness
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Wait command weirdness
For what it's worth, the need to add an unlock screen in version 6.6.2 sounds like a bug to me. A brief wait with messages is supposed to allow an idle period where the engine does its housekeeping. That includes updating the screen, which isn't happening here.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Wait command weirdness
OK, Jacque convinced meFor what it's worth, the need to add an unlock screen in version 6.6.2 sounds like a bug to me. A brief wait with messages is supposed to allow an idle period where the engine does its housekeeping. That includes updating the screen, which isn't happening here
reported as
Bug #12654
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Wait command weirdness
Is this behavior evident in 6.7?
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
Re: Wait command weirdness
No.Is this behavior evident in 6.7?
In 6.7 dp4 the repeat loop refreshes the screen without "wait with messages" or "unlock screen".
in 7.0 dp6 the repeat loop needs "wait with messages" only to refresh the screen. But if the field is unlocked and has a blinking cursor the insertion point draws incorrectly (mulitple times) as in pre 6.6.2.
Kind regards
Bernd
Re: Wait command weirdness
..........
Last edited by [-hh] on Wed Aug 13, 2014 2:17 pm, edited 1 time in total.
shiftLock happens
Re: Wait command weirdness
Hi Hermann,
your post made me look at this again.
What a surprise with or without "lock messages" in 6.6.2 my test stack ran without problem with or without "unlock screen".
The difference was that I did not have the project browser open.
And
simply opening the project browser screen update worked without "unlock screen"
BUT
once I display the card of the test stack in project browser I needed "unlock screen"
And now the weird part
If I have the project browser displaying the card of the test stack and I close the project browser by clicking into the red close button I still need "unlock screen"
The lesson for me is: test a bug without the project browser, just closing it might not be enough.
Could someone please confirm this behavior? Especially regarding project browser.
I attach my test stack
Kind regards
Bernd
your post made me look at this again.
What a surprise with or without "lock messages" in 6.6.2 my test stack ran without problem with or without "unlock screen".
The difference was that I did not have the project browser open.
And
simply opening the project browser screen update worked without "unlock screen"
BUT
once I display the card of the test stack in project browser I needed "unlock screen"
And now the weird part
If I have the project browser displaying the card of the test stack and I close the project browser by clicking into the red close button I still need "unlock screen"
The lesson for me is: test a bug without the project browser, just closing it might not be enough.
Could someone please confirm this behavior? Especially regarding project browser.
I attach my test stack
Kind regards
Bernd
- Attachments
-
- display field in tight repeat loop.livecode.zip
- (1.42 KiB) Downloaded 234 times
Re: Wait command weirdness
Mac os 10.9.2
LC 6.6.2
Inconsistently shows the problem.
But long long ago there was a posting about wait and the project browser I think. That is all I can remember about it.
Simon
LC 6.6.2
Inconsistently shows the problem.
But long long ago there was a posting about wait and the project browser I think. That is all I can remember about it.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Wait command weirdness
Dear all
Did this ever reach any form of resolution? I think that I'm experiencing the same with an animation that I've created.
On UpdateGraphicX
- Calculate the new location of GraphicX
- Lock Screen
- Change the points of GraphicX
- Unlock Screen
On AnimationIsGo
- Repeat while LetsGo is True
-- UpdateGraphicX
Button that toogles LetsGo between true and false, and calls AnimationIsGo when LetsGo is true
The above works fine, but my animation proceeds too fast so I need to slow it down. I add a Wait with messages command (I've tried varying the wait times) after the -- UpdateGraphicX command. Now my animation does ONE increment, then appears to stop; but when I push the toogle button to actually stop the animation - graphicX is redrawn in a location that shows that the new location has been calculated (but not displayed) many times.
After reading your forum entry - I add an unlock screen command immediately before the wait with messages command, and then everything works as it should (with the animation proceeding at an appropriate speed); but I don't understand why I needed what feels like an extra unlock screen command.
Livecode 7.06 on Windows
Thanks in advance
Kim
Did this ever reach any form of resolution? I think that I'm experiencing the same with an animation that I've created.
On UpdateGraphicX
- Calculate the new location of GraphicX
- Lock Screen
- Change the points of GraphicX
- Unlock Screen
On AnimationIsGo
- Repeat while LetsGo is True
-- UpdateGraphicX
Button that toogles LetsGo between true and false, and calls AnimationIsGo when LetsGo is true
The above works fine, but my animation proceeds too fast so I need to slow it down. I add a Wait with messages command (I've tried varying the wait times) after the -- UpdateGraphicX command. Now my animation does ONE increment, then appears to stop; but when I push the toogle button to actually stop the animation - graphicX is redrawn in a location that shows that the new location has been calculated (but not displayed) many times.
After reading your forum entry - I add an unlock screen command immediately before the wait with messages command, and then everything works as it should (with the animation proceeding at an appropriate speed); but I don't understand why I needed what feels like an extra unlock screen command.
Livecode 7.06 on Windows
Thanks in advance
Kim
Re: Wait command weirdness
Hi Kim,
it is hard to tell without the code you use. (the actual code, reduced to a minumum that shows the problem)
From your pseudo-code it should work.
The problem in this thread had mostly to do with Macs. Historically Macs did not update in a tight loop without a lock screen/unlock screen. Since the transition to Cocoa this has changed and now Mac behaves like Windows always behaved: you should not need a lock/unlock pair for display.
That said it is still wise to use lock/unlock when making more than one screen update in a dsplay handler. E.g. move grc to x,y, set the backgroundcolor of gr to xyz: that would be two screen updates without lock/unlock
Back to your original question why you need an additional unlock screen before "wait with messages" only your script could tell if it is in your script or a bug.
Kind regards
Bernd
it is hard to tell without the code you use. (the actual code, reduced to a minumum that shows the problem)
From your pseudo-code it should work.
The problem in this thread had mostly to do with Macs. Historically Macs did not update in a tight loop without a lock screen/unlock screen. Since the transition to Cocoa this has changed and now Mac behaves like Windows always behaved: you should not need a lock/unlock pair for display.
That said it is still wise to use lock/unlock when making more than one screen update in a dsplay handler. E.g. move grc to x,y, set the backgroundcolor of gr to xyz: that would be two screen updates without lock/unlock
Back to your original question why you need an additional unlock screen before "wait with messages" only your script could tell if it is in your script or a bug.
Kind regards
Bernd
Re: Wait command weirdness
Hi BernD
Hopefully - here it is. This is the first time I've tried to upload a file to the forum - please let me know if it doesn't work.
This code is now doing what I expected, but only after I inserted an "extra" unlock screen command (after reading the earlier comments in this post). I'm just curious as to why I need two unlock screen commands, when I've only got one lock screen.
Regards
Kim
Hopefully - here it is. This is the first time I've tried to upload a file to the forum - please let me know if it doesn't work.
This code is now doing what I expected, but only after I inserted an "extra" unlock screen command (after reading the earlier comments in this post). I'm just curious as to why I need two unlock screen commands, when I've only got one lock screen.
Regards
Kim
- Attachments
-
- TestGraphicCogsv2.zip
- (2.58 KiB) Downloaded 260 times
Re: Wait command weirdness
Hi Kim,
your code works for me using LC 7.1.1 RC4 on a Mac with or without blocking the line "unlock screen..."
So I don't know why you would need the extra unlock screen. There is nothing in your code that would explain it.
I would suggest that you download a more recent version of the 7.x.x series and test there.
http://downloads.livecode.com/livecode/
If you still need "unlock screen" then it might be something affecting LC 7.x.x and Windows.
That I can not test since I don't have access to a Windows Computer.
Tell us what you find out. If you still need unlock screen then please also mention your Windows version.
Maybe someone using Windows could chime in.
Kind regards
Bernd
your code works for me using LC 7.1.1 RC4 on a Mac with or without blocking the line "unlock screen..."
Code: Select all
RotatePoly "GhostTooth1", "Tooth1", 180, 300, ggAngle
--Unlock screen // Why do I need this command ########################
wait 100 milliseconds with messages
I would suggest that you download a more recent version of the 7.x.x series and test there.
http://downloads.livecode.com/livecode/
If you still need "unlock screen" then it might be something affecting LC 7.x.x and Windows.
That I can not test since I don't have access to a Windows Computer.
Tell us what you find out. If you still need unlock screen then please also mention your Windows version.
Maybe someone using Windows could chime in.
Kind regards
Bernd
Re: Wait command weirdness
Hi Bernd
Windows 7
On your suggestion I downloaded a more up-to-date version of Livecode. I'm now on 7.1.0, and the quirk of needing to enter the Unlock Screen command twice has disappeared.
Thanks AGAIN
Kim
Windows 7
On your suggestion I downloaded a more up-to-date version of Livecode. I'm now on 7.1.0, and the quirk of needing to enter the Unlock Screen command twice has disappeared.
Thanks AGAIN
Kim