Unusual Refresh Problems with Mac standalone
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Unusual Refresh Problems with Mac standalone
Hello.
I have developed an educational simulation that I distribute creating standalones for Windows and Mac.
Since some time, the Mac standalones have a serious problem related to page displays (pages are not correctly/fully refreshed, sometimes only partially, and the correctly refreshed page appears only if I move the window or generate UI events like clicking). The stack works perfectly in LiveCode before I create the mac standalone, and the Windows standalone does not have the same problem. Is it a Mac-related issue?
I am either looking for a simple statement to add in different places of my code in order to "force" the refresh, or other ways of resolving this issue.
In the meantime I am realizing that I am using the 9.6.1 version of LiveCode. I can try downloading and using the most recent LC version, but will it change something?
Thank you for your advice.
I have developed an educational simulation that I distribute creating standalones for Windows and Mac.
Since some time, the Mac standalones have a serious problem related to page displays (pages are not correctly/fully refreshed, sometimes only partially, and the correctly refreshed page appears only if I move the window or generate UI events like clicking). The stack works perfectly in LiveCode before I create the mac standalone, and the Windows standalone does not have the same problem. Is it a Mac-related issue?
I am either looking for a simple statement to add in different places of my code in order to "force" the refresh, or other ways of resolving this issue.
In the meantime I am realizing that I am using the 9.6.1 version of LiveCode. I can try downloading and using the most recent LC version, but will it change something?
Thank you for your advice.
-
- VIP Livecode Opensource Backer
- Posts: 9731
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Unusual Refresh Problems with Mac standalone
Hi.
Is this for mobile?
Craig
Is this for mobile?
Craig
Re: Unusual Refresh Problems with Mac standalone
Hi Albert,
sometimes
or
helps, is at least worth a try.
What script is executing when this happens?
Best
Klaus
sometimes
Code: Select all
...
lock screen
## do your thing...
unlock screen
...
Code: Select all
...
set the backcolor of this stack to the backcolor of this stack
...
What script is executing when this happens?
Best
Klaus
Re: Unusual Refresh Problems with Mac standalone
Thank you, Klaus
I tried playing with lock/unlock screen and the stack backcolor, but without success.
The problem occurs when I move to a different card. In the LiveCode environment (and the Windows standalone) it works well, but in the mac standalone it moves correctly to the different card but only redisplays a part of the screen (a relatively small rectangle). The card is there (I can even click on the buttons I do not see although they are there) but the re-display was not done fully.
The correct full display of the card appears only if I for instance slightly move the window in which the stack is, or minimize and then open it again.
Perhaps there is some code I could use to trigger a slight movement of the window (and back) - or a similar high-level event that would make the display appear correctly?
I tried playing with lock/unlock screen and the stack backcolor, but without success.
The problem occurs when I move to a different card. In the LiveCode environment (and the Windows standalone) it works well, but in the mac standalone it moves correctly to the different card but only redisplays a part of the screen (a relatively small rectangle). The card is there (I can even click on the buttons I do not see although they are there) but the re-display was not done fully.
The correct full display of the card appears only if I for instance slightly move the window in which the stack is, or minimize and then open it again.
Perhaps there is some code I could use to trigger a slight movement of the window (and back) - or a similar high-level event that would make the display appear correctly?
-
- VIP Livecode Opensource Backer
- Posts: 9731
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Unusual Refresh Problems with Mac standalone
Klaus.
I make standalones all the time, Windows and Mac. Never for mobile.
Craig
I make standalones all the time, Windows and Mac. Never for mobile.
Craig
Re: Unusual Refresh Problems with Mac standalone
Hi Albert,
Best
Klaus
you could try to move the stack a pixel or two:AlbertAA wrote: ↑Wed Jan 24, 2024 6:44 pmThe correct full display of the card appears only if I for instance slightly move the window in which the stack is, or minimize and then open it again.
Perhaps there is some code I could use to trigger a slight movement of the window (and back) - or a similar high-level event that would make the display appear correctly?
Code: Select all
...
## Move stack 1 px down and right:
move this stack rel 1,1
## And back to original position:
move stack rel -1,-1
...
Klaus
Re: Unusual Refresh Problems with Mac standalone
Crazy.
I have started inserting your 2 code lines (I call them "Schütteln vor dem Gebrauch") at the end of my openCard scripts and it looks like it solves/fixes the problem.
Still unclear to me what causes such a big difference between Win and Mac standalone behavior, but given that it makes my display problems disappear: THANK YOU A LOT - also for taking the time to react so rapidly!
-albert
I have started inserting your 2 code lines (I call them "Schütteln vor dem Gebrauch") at the end of my openCard scripts and it looks like it solves/fixes the problem.
Still unclear to me what causes such a big difference between Win and Mac standalone behavior, but given that it makes my display problems disappear: THANK YOU A LOT - also for taking the time to react so rapidly!
-albert
Re: Unusual Refresh Problems with Mac standalone
Hi Albert,
"Schütteln vor dem Gebrauch": großes Kino!
Gruß
Klaus
my pleasure, glad it fixed your problem.AlbertAA wrote: ↑Wed Jan 24, 2024 7:25 pmCrazy.
I have started inserting your 2 code lines (I call them "Schütteln vor dem Gebrauch") at the end of my openCard scripts and it looks like it solves/fixes the problem.
Still unclear to me what causes such a big difference between Win and Mac standalone behavior, but given that it makes my display problems disappear: THANK YOU A LOT - also for taking the time to react so rapidly!
-albert
"Schütteln vor dem Gebrauch": großes Kino!
Gruß
Klaus
Re: Unusual Refresh Problems with Mac standalone
Klaus & Albert --
Got a chuckle out of Albert's clever nickname for your suggested addition to his code, which I believe translates as "Shake before using."
But apart from the fact that it apparently works for him, Albert does still raise the legitimate question as to why this fix was even necessary and specific to Mac. It's not a problem that I've ever encountered with any of my Mac standalones that employ multiple cards.
Perhaps Albert can let us know on what version of macOS the standalone was misbehaving -- in case, for example, it is another new problem associated with Sonoma. Any other ideas?
jeff k
Got a chuckle out of Albert's clever nickname for your suggested addition to his code, which I believe translates as "Shake before using."
But apart from the fact that it apparently works for him, Albert does still raise the legitimate question as to why this fix was even necessary and specific to Mac. It's not a problem that I've ever encountered with any of my Mac standalones that employ multiple cards.
Perhaps Albert can let us know on what version of macOS the standalone was misbehaving -- in case, for example, it is another new problem associated with Sonoma. Any other ideas?
jeff k
Re: Unusual Refresh Problems with Mac standalone
Thank you for sharing your view, Jeff.
The only additional potentially valuable observations I can share are:
1. I had the problem before Sonoma, and upgrading did not change it.
2. The Mac standalone looks slower when it processes long texts within fields. The same for screen redraw operations.
3. It is important to use lock and unlock wisely.
4. I should take the time to clean the code and find out what caused the strange behaviour of the Mac standalone. Even at a time of big data and enormous computing power, coding quality is what makes the difference – I just realized it trying to run a couple of my stacks after upgrading from 9.6.1 to 9.6.11. Sloppy coding makes me faster, but I am likely to pay it later – poetic justice ☹ … or need to revert to creative “fixes” like this one.
My stacks happily “shake” now regularly. I start liking it, and might adopt it as a distinguishing, value-adding feature or the code I produce
-albert
The only additional potentially valuable observations I can share are:
1. I had the problem before Sonoma, and upgrading did not change it.
2. The Mac standalone looks slower when it processes long texts within fields. The same for screen redraw operations.
3. It is important to use lock and unlock wisely.
4. I should take the time to clean the code and find out what caused the strange behaviour of the Mac standalone. Even at a time of big data and enormous computing power, coding quality is what makes the difference – I just realized it trying to run a couple of my stacks after upgrading from 9.6.1 to 9.6.11. Sloppy coding makes me faster, but I am likely to pay it later – poetic justice ☹ … or need to revert to creative “fixes” like this one.
My stacks happily “shake” now regularly. I start liking it, and might adopt it as a distinguishing, value-adding feature or the code I produce
-albert
Re: Unusual Refresh Problems with Mac standalone
The part of the screen which does not draw ... is this just the bottom 25 pixels (menubar height) at the bottom of the window?
If so that is a bug which has been around for a long time and is very annoying. It is on the QC list. As noted the fix is to apply any sort of lock unlock screen combination for example with a visual effect or setting the background to itself, to make LC redraw the whole screen.
If so that is a bug which has been around for a long time and is very annoying. It is on the QC list. As noted the fix is to apply any sort of lock unlock screen combination for example with a visual effect or setting the background to itself, to make LC redraw the whole screen.
-
- Livecode Opensource Backer
- Posts: 9445
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Unusual Refresh Problems with Mac standalone
My Devawriter, which has 51 cards at the moment, has never, over 14 years of development and deployment, had this problem.It's not a problem that I've ever encountered with any of my Mac standalones that employ multiple cards.
Oh, and Klaus: sorry, I don't pay for anything with Deutsch Marks, only with Shillings:
- -
And anyone who uses the word 'Dinosaur' . . .
Good Lord, and to think that when my Grandfather gave me one of these in 1969 (when I was 7) I felt like a millionaire!
-
- VIP Livecode Opensource Backer
- Posts: 154
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Unusual Refresh Problems with Mac standalone
It’s been a while… and, I think my redraw issue was with iOS… but, I added a “go to this card” in several of the handlers to force a redraw.
take care,
Randy
take care,
Randy