Checking boxes within a group
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Checking boxes within a group
I have a Group (Scrl). Within that group are Buttons that function as checkboxes (ie: I have an image of an unchecked box and a checked box that switch when clicked on). They are grouped because this is a scrollable card. I am using this code to scroll:
on OpenCard
set the layerMode of group "Scrl" to "scrolling"
if the platform is "iphone" then
set the compositorType of this stack to "opengl"
else
set the compositorType of this stack to "software"
end if
set the compositorTileSize of this stack to 64
set the compositorCacheLimit of this stack to (16 * 1024 * 1024)
end OpenCard
My issue is that when I scroll and then try to click one of the buttons, the screen jumps (as it finds the object) and then I have to click again to actually get the button to function (change image). Is there a way I can get this to not jump, and to immediately change my image when clicked?
Thanks.
on OpenCard
set the layerMode of group "Scrl" to "scrolling"
if the platform is "iphone" then
set the compositorType of this stack to "opengl"
else
set the compositorType of this stack to "software"
end if
set the compositorTileSize of this stack to 64
set the compositorCacheLimit of this stack to (16 * 1024 * 1024)
end OpenCard
My issue is that when I scroll and then try to click one of the buttons, the screen jumps (as it finds the object) and then I have to click again to actually get the button to function (change image). Is there a way I can get this to not jump, and to immediately change my image when clicked?
Thanks.
Re: Checking boxes within a group
Hi Tester2,
I deleted your double posting.
As Simon said, please only one thread per question, thanks!
You could simply use a "real" checkbox object and set its ICON (icon and hilite) properties!
This way you do not need to group and/or script anything and this will surely scroll as desired!
At least worth a try
Best
Klaus
I deleted your double posting.
As Simon said, please only one thread per question, thanks!
You could simply use a "real" checkbox object and set its ICON (icon and hilite) properties!
This way you do not need to group and/or script anything and this will surely scroll as desired!
At least worth a try

Best
Klaus
Re: Checking boxes within a group
I changed them to Check Box type buttons, but I still have the issue.
I need to have them as part of the group so that the user can scroll the card (the checkboxes on my card extend beyond the initial size of the iPhone so the user must scroll down to see/and check the checkboxes.
Does that make sense?
I need to have them as part of the group so that the user can scroll the card (the checkboxes on my card extend beyond the initial size of the iPhone so the user must scroll down to see/and check the checkboxes.
Does that make sense?
Re: Checking boxes within a group
Could you post a sample stack?
Simon
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Checking boxes within a group
Posting a stripped-out stack is always a great way to get helpful answers 
And as a fellow LiveCoder who struggled with compositor... thingy for a long time,
I must say, don't use them
unless it's a specialized app which should be customized according to the device
and you don't know what you're doing exactly.
Use set the acceleratedRendering of this stack to true instead,
this command chooses the best settings for the device.
You can check this post, if you want a little more detail about this issue.
Best,
~ Ender Nafi

And as a fellow LiveCoder who struggled with compositor... thingy for a long time,
I must say, don't use them
unless it's a specialized app which should be customized according to the device
and you don't know what you're doing exactly.
Use set the acceleratedRendering of this stack to true instead,
this command chooses the best settings for the device.
You can check this post, if you want a little more detail about this issue.
Best,
~ Ender Nafi
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
Re: Checking boxes within a group
Here is a link to a sample "ScrollSample" stack:
http://dl.dropbox.com/u/5777653/ScrollS ... vecode.zip
If you go to the card with the screenshots and checkboxes then you can see the weird navigation issues that I am having when checking/unchecking the boxes. The screen kind of jumps and is chunky.
Please let me know of any remedies/comments.
Thanks!
http://dl.dropbox.com/u/5777653/ScrollS ... vecode.zip
If you go to the card with the screenshots and checkboxes then you can see the weird navigation issues that I am having when checking/unchecking the boxes. The screen kind of jumps and is chunky.
Please let me know of any remedies/comments.
Thanks!
Re: Checking boxes within a group
Hi Tester2,
Check this one out: No jumpy behavior, anymore.
I've changed your scroller script in group "Scrl" to the native mobile scroller. It's in the card script.
If you still want to go with your original scroller script, it requires too much coding to behave.
Actual problem is that the mouseUp events triggered by the checkboxes are interfering with the scroller script's events.
If this is another problem, please explain a little further.
One humble advice, though;
you'll probably need a good resize handler.
The stack looks nice in iphone5
but it crops the bottom edge in iphone4 and it crops all over in iphone3.
Hope it helps...
Best,
~ Ender Nafi
Check this one out: No jumpy behavior, anymore.
I've changed your scroller script in group "Scrl" to the native mobile scroller. It's in the card script.
If you still want to go with your original scroller script, it requires too much coding to behave.
Actual problem is that the mouseUp events triggered by the checkboxes are interfering with the scroller script's events.
I didn't quite get what you mean.and to immediately change my image when clicked?
If this is another problem, please explain a little further.
One humble advice, though;
you'll probably need a good resize handler.
The stack looks nice in iphone5
but it crops the bottom edge in iphone4 and it crops all over in iphone3.
Hope it helps...
Best,
~ Ender Nafi
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
Re: Checking boxes within a group
My 2 cents (though Ender's use the native mobile scroller is better)
at the bottom of all your checkbox mouseUp scripts add "pass mouseUp".
Simon
at the bottom of all your checkbox mouseUp scripts add "pass mouseUp".
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Checking boxes within a group
Simon, your 2 cents won 
I've checked out your solution and voila...
So, Tester2;
you can choose whichever solution you want.
Both works.
Go wild
~ Ender Nafi
P.S.: Don't forget the resize handler unless you don't have one already.

I've checked out your solution and voila...
So, Tester2;
you can choose whichever solution you want.
Both works.
Go wild

~ Ender Nafi
P.S.: Don't forget the resize handler unless you don't have one already.
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8