same code different result
Moderators: heatherlaine, kevinmiller, robinmiller, malte
same code different result
Hi, I was starting to use the animation engine in my stack when this problem appeared, i use the same code to move two objects in a card but 1 is "glitched" meaning is not moving well, with glitches on the way and the other totally normally, the strange thing is that in the beginning the "glitched! one was moving normally then i changed the image resolution and since then it's glitched, even after I have returned the resolution to the one it was before Any ideas on how this occurred? Thanks!
P.S i leave here an example stack.
P.S i leave here an example stack.
Samuele.
-
- VIP Livecode Opensource Backer
- Posts: 9731
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: same code different result
Samuele.
Opened your stack and hit the button. The yellow thing moves smoothly. What is it you wanted to demonstrate?
Craig
Opened your stack and hit the button. The yellow thing moves smoothly. What is it you wanted to demonstrate?
Craig
-
- Livecode Opensource Backer
- Posts: 9445
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: same code different result
Nothing obviously wrong.
However I could not resist the temptation to rewrite the functionality so you do not need the animation engine:
-
However I could not resist the temptation to rewrite the functionality so you do not need the animation engine:
-
- Attachments
-
- MenuTwitch.livecode.zip
- (22.62 KiB) Downloaded 128 times
-
- VIP Livecode Opensource Backer
- Posts: 7257
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: same code different result
LC may be caching the image when the stack opens. Try closing and removing it from memory, and then open it again. See if that fixes it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Livecode Opensource Backer
- Posts: 9445
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: same code different result
Exactly what Jacque says.
Be careful NOT to choose CLOSE but choose CLOSE and REMOVE:
- -
AND try and see if the same problem arises with my version . . .
Different code same result
Be careful NOT to choose CLOSE but choose CLOSE and REMOVE:
- -
AND try and see if the same problem arises with my version . . .
Different code same result
Re: same code different result
ahh, so send it to myself and then download it?
Last edited by Samuele on Sun Feb 06, 2022 10:12 pm, edited 1 time in total.
Samuele.
Re: same code different result
yep, so that's the proof that the problem is on the images and not the script...richmond62 wrote: ↑Sun Feb 06, 2022 7:50 pmAND try and see if the same problem arises with my version . . .
Samuele.
-
- VIP Livecode Opensource Backer
- Posts: 7257
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: same code different result
You don't need to do that. Just choose "Close and remove from memory" from the File menu. That will eliminate the cache. Then choose Open Stack to open your file again.
Or you can accomplish the same thing by just restarting LC.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: same code different result
I must say, i never really understood why LC will 'close' files but keep them open in memory. There must be a use-case for this, but none that affects me, so i have set my preferences to always close file (even if destroyStack is false) and to assign destroyStack to true for all new stacks, so closing them removes the from memory as well.
Can be quite confusing occasionally otherwise!
Can be quite confusing occasionally otherwise!
-
- Livecode Opensource Backer
- Posts: 9445
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: same code different result
Well, either I'm very stupid (don't answer that one), or there's some sort of communication breakdown,yep, so that's the proof that the problem is on the images and not the script...
because:
1. I can see nothing wrong with the functionality of your stack.
[I can see something wrong with the affordances, and will write about those later]
2. I cannot exactly understand what you mean by your problem.
If you could make a quick on-screen movie of the problem that would be super.
-
- Livecode Opensource Backer
- Posts: 9445
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: same code different result
ahhh, i restarted LC like a million times and tried your way as well, with no success...
Samuele.
-
- Livecode Opensource Backer
- Posts: 9445
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: same code different result
Try your stack with another version of LiveCode:
https://archive.org/details/live-code-c ... ws-x86-x64
https://archive.org/details/live-code-c ... taller-mac
https://archive.org/details/live-code-c ... ws-x86-x64
https://archive.org/details/live-code-c ... taller-mac
Re: same code different result
alright, i know I'm a bit color blind and now i know I'm also not particularly smart, but what difference does it make if you understood?richmond62 wrote: ↑Mon Feb 07, 2022 11:03 amAffordances:
https://en.wikipedia.org/wiki/Don_Norman
-
SShot 2022-02-07 at 11.55.58.png
-
SShot 2022-02-07 at 12.01.10.png
Just kidding here, that's the video, i hope it'll be clearer than my words https://www.dropbox.com/t/z6dHsrfOOXJqxKhl
Samuele.
Re: same code different result
i already have have 2 versions on my pc, LC community 9.5 and 9.6.3richmond62 wrote: ↑Mon Feb 07, 2022 12:24 pmTry your stack with another version of LiveCode:
https://archive.org/details/live-code-c ... ws-x86-x64
https://archive.org/details/live-code-c ... taller-mac
Samuele.