Re: Setting mobile scroller hScroll fails
On 5/29/19 6:22 PM, Monte Goulding via use-livecode wrote: The max scroll will be the formattedWidth of the group - the width of the group unless you have unboundedHScroll true. I_think_ if it’s false then the engine will automagically clamp that though. I tried that but it didn't scroll to the far edge, so I set it back to using the formattedwidth of the group as the hscroll. I'll try to set up a sample stack later and put it in the bug database. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Setting mobile scroller hScroll fails
Whenever someone says "math" my eyes kind of glaze over and my brain shuts off. I'm using your sample script to resize the group so it expands to the screen edges, which works great. I'm not sure how to change the scroller so it works with that setup, but I did wonder if scrollers were limited to the card size and that might be why it wasn't working. I think I'll write it up as Monte suggested, though I'm not sure whether to call it a bug, a feature request, or just impossible. On 5/29/19 5:29 PM, Brian Milby via use-livecode wrote: I think it is going to take some math but the scroller should be set for the area within the card rect since the areas left/right are not going to be responsive to the scroller. Thanks, Brian On May 29, 2019, 2:01 PM -0500, J. Landman Gay via use-livecode , wrote: Thanks Monte, I did over-summarize. I'm not sure why it's going wrong, but it sounds like it's something I'm doing. I have a standard "createScroller" handler that I've been using for years, but I've never had to set the hScroll before. It's always been zero. In this case, I set the hScroll of the group to the formattedWidth of the group, which may be wrong. The engine seems to compensate though and sets the scroll as far as it should go. Then I call "createScroller" and pass the name of the group. The handler: command createScroller pName -- pName = the long ID of a grp put the rect of control pName into tRect put the hScrollBar of control pName into tHScroller put the vScrollBar of control pName into tVScroller put the hScroll of control pName into tHScroll put the vScroll of control pName into tVScroll set the hScrollBar of control pName to false -- remove fld scrollbars on mobile set the vScrollBar of control pName to false mobileControlCreate "scroller", pName mobileControlSet pName, "rect", tRect put ("0,0," & (the formattedwidth of control pName) & "," & the formattedheight of control pName) into tContentRect mobileControlSet pName, "contentRect", tContentRect mobileControlSet pName, "hScroll", 0 mobileControlSet pName, "vScroll", 0 mobileControlSet pName, "hIndicator", tHScroller mobileControlSet pName, "vIndicator", tVScroller mobileControlSet pName, "hScroll", tHScroll mobileControlSet pName, "vScroll", tVScroll mobileControlSet pName, "visible", true end createScroller I initialize both the group and the scroller to 0 before doing anything else, because when I wrote it I couldn't get them to align correctly otherwise. I should also probably mention that I'm using fullscreenMode "showAll" and the group is expanded beyond the borders of the card to fill the screen; i.e., it probably has a negative left margin and a wider right margin. When the scroller finally does scroll (after resetting itself) it scrolls too far at the left side by the number of pixels between the screen left and the card left, and cuts off the same amount on the right side. Can you see what I should change? On 5/28/19 6:33 PM, Monte Goulding via use-livecode wrote: Hi Jacque I’m thinking you are over summarising what you are doing here. For example, I expect you mean to set the hScroll of the group to the formattedWidth - the width of the group. Are you setting the contentRect appropriately before setting the hScroll of the scroller? Cheers Monte On 27 May 2019, at 8:03 am, J. Landman Gay via use-livecode wrote: I want to verify this is a bug and not just me. I'm creating a mobile scroller over a group. I want the group to initially display with its hScroll all the way to the right. I'm doing this: zoom the group out to fill the screen create a mobile scroller with the same rect set the hScroll of the group to its formattedWidth set the hScroll of the scroller to the scroll of the group If I insert an answer command to show the scroller's hScroll it reports the correct number. But the scroller always acts like its scroll is 0, and it won't scroll to the left at all. But scrolling it to the right zaps both it and the group to zero and after that it scrolls normally. I've also tried not setting the group's scroll and just setting the scroller alone, thinking it might trigger the scrollerDidScroll handler, but it doesn't. If I don't set any hScroll at all on either the group or the scroller, all is well. Has anyone else seen this? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive
Re: Setting mobile scroller hScroll fails
> On 30 May 2019, at 5:01 am, J. Landman Gay via use-livecode > wrote: > > Thanks Monte, I did over-summarize. I'm not sure why it's going wrong, but it > sounds like it's something I'm doing. I have a standard "createScroller" > handler that I've been using for years, but I've never had to set the hScroll > before. It's always been zero. > > In this case, I set the hScroll of the group to the formattedWidth of the > group, which may be wrong. The max scroll will be the formattedWidth of the group - the width of the group unless you have unboundedHScroll true. I _think_ if it’s false then the engine will automagically clamp that though. > The engine seems to compensate though and sets the scroll as far as it should > go. Then I call "createScroller" and pass the name of the group. The handler: > > command createScroller pName > -- pName = the long ID of a grp > put the rect of control pName into tRect > put the hScrollBar of control pName into tHScroller > put the vScrollBar of control pName into tVScroller > put the hScroll of control pName into tHScroll > put the vScroll of control pName into tVScroll > set the hScrollBar of control pName to false -- remove fld scrollbars on > mobile > set the vScrollBar of control pName to false > mobileControlCreate "scroller", pName > mobileControlSet pName, "rect", tRect > put ("0,0," & (the formattedwidth of control pName) & "," & the > formattedheight of control pName) into tContentRect > mobileControlSet pName, "contentRect", tContentRect > mobileControlSet pName, "hScroll", 0 > mobileControlSet pName, "vScroll", 0 > mobileControlSet pName, "hIndicator", tHScroller > mobileControlSet pName, "vIndicator", tVScroller > mobileControlSet pName, "hScroll", tHScroll > mobileControlSet pName, "vScroll", tVScroll > mobileControlSet pName, "visible", true > end createScroller > > I initialize both the group and the scroller to 0 before doing anything else, > because when I wrote it I couldn't get them to align correctly otherwise. I > should also probably mention that I'm using fullscreenMode "showAll" and the > group is expanded beyond the borders of the card to fill the screen; i.e., it > probably has a negative left margin and a wider right margin. > When the scroller finally does scroll (after resetting itself) it scrolls too > far at the left side by the number of pixels between the screen left and the > card left, and cuts off the same amount on the right side. > > Can you see what I should change? I’m really not sure at this stage. Have you tried logging the x,y values you get in scrollerDidScroll? This may need a simple stack to reproduce it and an email to support so we can figure out what’s up. Cheers Monte ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Setting mobile scroller hScroll fails
I think it is going to take some math but the scroller should be set for the area within the card rect since the areas left/right are not going to be responsive to the scroller. Thanks, Brian On May 29, 2019, 2:01 PM -0500, J. Landman Gay via use-livecode , wrote: > Thanks Monte, I did over-summarize. I'm not sure why it's going wrong, > but it sounds like it's something I'm doing. I have a standard > "createScroller" handler that I've been using for years, but I've never > had to set the hScroll before. It's always been zero. > > In this case, I set the hScroll of the group to the formattedWidth of > the group, which may be wrong. The engine seems to compensate though and > sets the scroll as far as it should go. Then I call "createScroller" and > pass the name of the group. The handler: > > command createScroller pName > -- pName = the long ID of a grp > put the rect of control pName into tRect > put the hScrollBar of control pName into tHScroller > put the vScrollBar of control pName into tVScroller > put the hScroll of control pName into tHScroll > put the vScroll of control pName into tVScroll > set the hScrollBar of control pName to false -- remove fld scrollbars > on mobile > set the vScrollBar of control pName to false > mobileControlCreate "scroller", pName > mobileControlSet pName, "rect", tRect > put ("0,0," & (the formattedwidth of control pName) & "," & the > formattedheight of control pName) into tContentRect > mobileControlSet pName, "contentRect", tContentRect > mobileControlSet pName, "hScroll", 0 > mobileControlSet pName, "vScroll", 0 > mobileControlSet pName, "hIndicator", tHScroller > mobileControlSet pName, "vIndicator", tVScroller > mobileControlSet pName, "hScroll", tHScroll > mobileControlSet pName, "vScroll", tVScroll > mobileControlSet pName, "visible", true > end createScroller > > I initialize both the group and the scroller to 0 before doing anything > else, because when I wrote it I couldn't get them to align correctly > otherwise. I should also probably mention that I'm using fullscreenMode > "showAll" and the group is expanded beyond the borders of the card to > fill the screen; i.e., it probably has a negative left margin and a > wider right margin. When the scroller finally does scroll (after > resetting itself) it scrolls too far at the left side by the number of > pixels between the screen left and the card left, and cuts off the same > amount on the right side. > > Can you see what I should change? > > > On 5/28/19 6:33 PM, Monte Goulding via use-livecode wrote: > > Hi Jacque > > > > I’m thinking you are over summarising what you are doing here. For example, > > I expect you mean to set the hScroll of the group to the formattedWidth - > > the width of the group. Are you setting the contentRect appropriately > > before setting the hScroll of the scroller? > > > > Cheers > > > > Monte > > > > > On 27 May 2019, at 8:03 am, J. Landman Gay via use-livecode > > > wrote: > > > > > > I want to verify this is a bug and not just me. > > > > > > I'm creating a mobile scroller over a group. I want the group to > > > initially display with its hScroll all the way to the right. I'm doing > > > this: > > > > > > zoom the group out to fill the screen > > > create a mobile scroller with the same rect > > > set the hScroll of the group to its formattedWidth > > > set the hScroll of the scroller to the scroll of the group > > > > > > If I insert an answer command to show the scroller's hScroll it reports > > > the correct number. But the scroller always acts like its scroll is 0, > > > and it won't scroll to the left at all. But scrolling it to the right > > > zaps both it and the group to zero and after that it scrolls normally. > > > > > > I've also tried not setting the group's scroll and just setting the > > > scroller alone, thinking it might trigger the scrollerDidScroll handler, > > > but it doesn't. > > > > > > If I don't set any hScroll at all on either the group or the scroller, > > > all is well. > > > > > > Has anyone else seen this? > > > > > > -- > > > Jacqueline Landman Gay | jac...@hyperactivesw.com > > > HyperActive Software | http://www.hyperactivesw.com > > > > > > ___ > > > use-livecode mailing list > > > use-livecode@lists.runrev.com > > > Please visit this url to subscribe, unsubscribe and manage your > > > subscription preferences: > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please
Re: Setting mobile scroller hScroll fails
Thanks Monte, I did over-summarize. I'm not sure why it's going wrong, but it sounds like it's something I'm doing. I have a standard "createScroller" handler that I've been using for years, but I've never had to set the hScroll before. It's always been zero. In this case, I set the hScroll of the group to the formattedWidth of the group, which may be wrong. The engine seems to compensate though and sets the scroll as far as it should go. Then I call "createScroller" and pass the name of the group. The handler: command createScroller pName -- pName = the long ID of a grp put the rect of control pName into tRect put the hScrollBar of control pName into tHScroller put the vScrollBar of control pName into tVScroller put the hScroll of control pName into tHScroll put the vScroll of control pName into tVScroll set the hScrollBar of control pName to false -- remove fld scrollbars on mobile set the vScrollBar of control pName to false mobileControlCreate "scroller", pName mobileControlSet pName, "rect", tRect put ("0,0," & (the formattedwidth of control pName) & "," & the formattedheight of control pName) into tContentRect mobileControlSet pName, "contentRect", tContentRect mobileControlSet pName, "hScroll", 0 mobileControlSet pName, "vScroll", 0 mobileControlSet pName, "hIndicator", tHScroller mobileControlSet pName, "vIndicator", tVScroller mobileControlSet pName, "hScroll", tHScroll mobileControlSet pName, "vScroll", tVScroll mobileControlSet pName, "visible", true end createScroller I initialize both the group and the scroller to 0 before doing anything else, because when I wrote it I couldn't get them to align correctly otherwise. I should also probably mention that I'm using fullscreenMode "showAll" and the group is expanded beyond the borders of the card to fill the screen; i.e., it probably has a negative left margin and a wider right margin. When the scroller finally does scroll (after resetting itself) it scrolls too far at the left side by the number of pixels between the screen left and the card left, and cuts off the same amount on the right side. Can you see what I should change? On 5/28/19 6:33 PM, Monte Goulding via use-livecode wrote: Hi Jacque I’m thinking you are over summarising what you are doing here. For example, I expect you mean to set the hScroll of the group to the formattedWidth - the width of the group. Are you setting the contentRect appropriately before setting the hScroll of the scroller? Cheers Monte On 27 May 2019, at 8:03 am, J. Landman Gay via use-livecode wrote: I want to verify this is a bug and not just me. I'm creating a mobile scroller over a group. I want the group to initially display with its hScroll all the way to the right. I'm doing this: zoom the group out to fill the screen create a mobile scroller with the same rect set the hScroll of the group to its formattedWidth set the hScroll of the scroller to the scroll of the group If I insert an answer command to show the scroller's hScroll it reports the correct number. But the scroller always acts like its scroll is 0, and it won't scroll to the left at all. But scrolling it to the right zaps both it and the group to zero and after that it scrolls normally. I've also tried not setting the group's scroll and just setting the scroller alone, thinking it might trigger the scrollerDidScroll handler, but it doesn't. If I don't set any hScroll at all on either the group or the scroller, all is well. Has anyone else seen this? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Setting mobile scroller hScroll fails
Hi Jacque I’m thinking you are over summarising what you are doing here. For example, I expect you mean to set the hScroll of the group to the formattedWidth - the width of the group. Are you setting the contentRect appropriately before setting the hScroll of the scroller? Cheers Monte > On 27 May 2019, at 8:03 am, J. Landman Gay via use-livecode > wrote: > > I want to verify this is a bug and not just me. > > I'm creating a mobile scroller over a group. I want the group to initially > display with its hScroll all the way to the right. I'm doing this: > > zoom the group out to fill the screen > create a mobile scroller with the same rect > set the hScroll of the group to its formattedWidth > set the hScroll of the scroller to the scroll of the group > > If I insert an answer command to show the scroller's hScroll it reports the > correct number. But the scroller always acts like its scroll is 0, and it > won't scroll to the left at all. But scrolling it to the right zaps both it > and the group to zero and after that it scrolls normally. > > I've also tried not setting the group's scroll and just setting the scroller > alone, thinking it might trigger the scrollerDidScroll handler, but it > doesn't. > > If I don't set any hScroll at all on either the group or the scroller, all is > well. > > Has anyone else seen this? > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Setting mobile scroller hScroll fails
Something similair with 2 fields, of which one did scroll (vertical) and the other not, Although the script for both was the same except for some naming to distinguish them. Did not have time to upon it further. (on Android) Op 27-5-2019 om 00:03 schreef J. Landman Gay via use-livecode: I want to verify this is a bug and not just me. I'm creating a mobile scroller over a group. I want the group to initially display with its hScroll all the way to the right. I'm doing this: zoom the group out to fill the screen create a mobile scroller with the same rect set the hScroll of the group to its formattedWidth set the hScroll of the scroller to the scroll of the group If I insert an answer command to show the scroller's hScroll it reports the correct number. But the scroller always acts like its scroll is 0, and it won't scroll to the left at all. But scrolling it to the right zaps both it and the group to zero and after that it scrolls normally. I've also tried not setting the group's scroll and just setting the scroller alone, thinking it might trigger the scrollerDidScroll handler, but it doesn't. If I don't set any hScroll at all on either the group or the scroller, all is well. Has anyone else seen this? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Setting mobile scroller hScroll fails
I want to verify this is a bug and not just me. I'm creating a mobile scroller over a group. I want the group to initially display with its hScroll all the way to the right. I'm doing this: zoom the group out to fill the screen create a mobile scroller with the same rect set the hScroll of the group to its formattedWidth set the hScroll of the scroller to the scroll of the group If I insert an answer command to show the scroller's hScroll it reports the correct number. But the scroller always acts like its scroll is 0, and it won't scroll to the left at all. But scrolling it to the right zaps both it and the group to zero and after that it scrolls normally. I've also tried not setting the group's scroll and just setting the scroller alone, thinking it might trigger the scrollerDidScroll handler, but it doesn't. If I don't set any hScroll at all on either the group or the scroller, all is well. Has anyone else seen this? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode