same code different result
Moderators: heatherlaine, kevinmiller, robinmiller, malte
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: same code different result
OK: have you checked your stack with both those versions?
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: same code different result
Yes, I did, and apart from the fact that you need to send 'Click me' back to a lower layerdid you have a chance to see the video?
I could not see anything wrong at all.
-
- VIP Livecode Opensource Backer
- Posts: 7255
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: same code different result
I set my prefs the same way, all my stacks are removed from memory when closed. The default behavior dates back to ancient times when computers were older and slower, and increasing computer RAM was prohibitively expensive. Recreating the window structure was time-consuming and so was recreating the content, so to speed up screen rendering we were given the choice to leave it in memory, or remove the content and leave the window structure, or to remove both. It isn't very relevant today because everything is much faster and any difference isn't usually noticeable.stam wrote: ↑Mon Feb 07, 2022 1:57 amI 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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 7255
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: same code different result
I just looked at the sample Menu stack, and since don't have AE both buttons were very jerky. I wonder why the stack doesn't just use the built-in "move" command, it should behave very well. I vaguely recall that didn't work for some reason but I don't remember why.
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
the problem is that the menu at the bottom of the stack moves in jerks, unlike the top menu that moves smoothlyrichmond62 wrote: ↑Mon Feb 07, 2022 3:42 pmYes, I did, and apart from the fact that you need to send 'Click me' back to a lower layerdid you have a chance to see the video?
I could not see anything wrong at all.
Samuele.
-
- VIP Livecode Opensource Backer
- Posts: 9709
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: same code different result
So I tried the same handler in the group script but applied to a single button. It moves smoothly. I have moved groups of objects before and, though never lots and lots of children in them, they have always moved nicely. I just tried it again.
Is there something in the group here that is so "heavy" it cannot get up and go?
Craig
Is there something in the group here that is so "heavy" it cannot get up and go?
Craig
Last edited by dunbarx on Mon Feb 07, 2022 11:35 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 9709
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: same code different result
A group of images does not move smoothly with the move command. A handful of random imported images, grouped together and run with the handler from Samuele is very jerky.
Even one image is not particularly smooth.
A bunch of buttons is very smooth.
Craig
Even one image is not particularly smooth.
A bunch of buttons is very smooth.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9847
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: same code different result
Oddly enough, I've found smoother redraw by displaying a reference to the image as a button icon than displaying the image itself directly.
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: same code different result
it gives the same result if it's a single image (not grouped) or a group that contains buttons with icons
Samuele.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: same code different result
Have you tried the stack on an Android device or an Android emulator?
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: same code different result
Have you tried my version on Android?
The whole thing is very odd.
Certainly the ONLY jerkiness I see over here on MacOS 12 is because:
Yours:
You move the vertical position of your image 'menu2' by 12 pixels, and that does NOT
happen smoothly, but as a jerk at one point.
My version does NOT move the vertical position, and I can see no jerkiness.
I also wonder of the "overshoot' doesn't cause problems.
The whole thing is very odd.
Certainly the ONLY jerkiness I see over here on MacOS 12 is because:
Yours:
Code: Select all
global _gopenAndClose2
on mouseUp
if _gopenAndClose2 = 0
then
aeMoveTo the long id of image "menu2", -62, 312, 1000, "overshoot"
put 1 into _gopenAndClose2
#disable image "Menu"
else
aeMoveTo the long id of image "menu2", 100, 300, 1000, "overshoot"
put 0 into _gopenAndClose2
end if
//put _gopenAndClose into fld "MenuOpenAndClose"
//save this stack
//poi quando entra nel card aloora metti il field nel variable
end mouseUp
happen smoothly, but as a jerk at one point.
My version does NOT move the vertical position, and I can see no jerkiness.
I also wonder of the "overshoot' doesn't cause problems.
-
- VIP Livecode Opensource Backer
- Posts: 4013
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: same code different result
Hi Samuele,
I think that the reason why the composed image moves worst than the one image is the fact that apparently Livecode has trouble moving those 6 images in sync.
I scaled your images to their original size and then took a snapshot from the group they were in. Then I scaled down the one resulting image to approximately the size of your multi image group.
For "button" function I overlayed the image with buttons. The right most is the one with the script.
Animating the newly created "one-image" group is a lot smoother then the multi-image group.
Kind regards
Bernd
I think that the reason why the composed image moves worst than the one image is the fact that apparently Livecode has trouble moving those 6 images in sync.
I scaled your images to their original size and then took a snapshot from the group they were in. Then I scaled down the one resulting image to approximately the size of your multi image group.
For "button" function I overlayed the image with buttons. The right most is the one with the script.
Animating the newly created "one-image" group is a lot smoother then the multi-image group.
Kind regards
Bernd
- Attachments
-
- animateImage.livecode.zip
- (56.9 KiB) Downloaded 111 times
-
- VIP Livecode Opensource Backer
- Posts: 7255
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: same code different result
This is what layerMode is for. The group's layerMode should be set to "dynamic" which will cache the contents and allow it to travel smoothly.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com