MobilecontrolSet native scroller on LC10. Does it works?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
MobilecontrolSet native scroller on LC10. Does it works?
I'm having problems with the native scroller, both on scrolling a group and using Datagrid tables, on LC10 (unfortunately I am stuck with this version).
Is this me or some new bug is born?
My problems are with the contentRect (completely disalagned, no matter wha,t on respect to the content) and on vscroll. Also i get different behaviours on iOS simulator, iOS hardware and Android.
Before putting together a test stack, I would like to know if others had similar problems.
Thanks
Is this me or some new bug is born?
My problems are with the contentRect (completely disalagned, no matter wha,t on respect to the content) and on vscroll. Also i get different behaviours on iOS simulator, iOS hardware and Android.
Before putting together a test stack, I would like to know if others had similar problems.
Thanks
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: MobilecontrolSet native scroller on LC10. Does it works?
Hello.
I attached a sample stack, that should work on IDE, on iOS and Android.
It seems to me that the problem could be me and not LC10, since I cannot find a correct "fullscreenmode" combination (most of my standalone is run in "letterbox").
I would like the 2 scolling list to be resized in height, according to the available screen height, taking in account screen peculiarity like in iPhone Pro Max (the OS forniture, like the camera).
But, of course, I need the scrolling to work, showing all the names when scrolled down.
I have done several mobile scrollers in the past, but I always struggle to get them to work correctly .
Any help?
Thanks
Trevix
I attached a sample stack, that should work on IDE, on iOS and Android.
It seems to me that the problem could be me and not LC10, since I cannot find a correct "fullscreenmode" combination (most of my standalone is run in "letterbox").
I would like the 2 scolling list to be resized in height, according to the available screen height, taking in account screen peculiarity like in iPhone Pro Max (the OS forniture, like the camera).
But, of course, I need the scrolling to work, showing all the names when scrolled down.
I have done several mobile scrollers in the past, but I always struggle to get them to work correctly .
Any help?
Thanks
Trevix
- Attachments
-
- ScrollerTest 2.livecode.zip
- (6.38 KiB) Downloaded 58 times
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: MobilecontrolSet native scroller on LC10. Does it works?
Hi Trevix,
looking at your code regarding scrolling on mobile in the scripts of group "GroupTeams" and group "GroupPlayers":
You set the contentRect to tFormattedHeight and then set the height of the field to tFormattedHeight.
If both are the same there is nothing to scroll.
Try to set the height of field "FldList" to the height it should have on the screen and if tFormattedHeight of the field is greater than the height of the field the scroller should kick in.
Unfortunately I can not test this for mobile because my setup is not up to date.
KInd regards
Bernd
looking at your code regarding scrolling on mobile in the scripts of group "GroupTeams" and group "GroupPlayers":
Code: Select all
mobileControlSet sScrollerId, "contentRect", (0, 0, tWidth, tFormattedHeight)
Code: Select all
set the height of field "FldList" of me to tFormattedHeight -- < this line
set the top of field "FldList" of me to the top of me
--set the listbehavior of fld "FldList" of me to true --false
end StartScroller
If both are the same there is nothing to scroll.
Try to set the height of field "FldList" to the height it should have on the screen and if tFormattedHeight of the field is greater than the height of the field the scroller should kick in.
Unfortunately I can not test this for mobile because my setup is not up to date.
KInd regards
Bernd
Re: MobilecontrolSet native scroller on LC10. Does it works?
For what I understand...
On line 21 I set the height of the field to the same height of the group that conatains it.
This in order to be able to scroll "the field" in the IDE, since on line 23 I exit "StartScroll" if not mobile.
On mobile instead (on the following lines) the field is FormattedHeighted, so that the mobile control can scroll it, showing only the group height.
The mobilescroller works fine if on PreOpencard I set the fullscreenmode to empty, but the display is not (objects are not entered as they should): If instead on PreOpencard I set the fullscreenmode to letterbox, the display is correct, but the scroller does not seem to work well (Simulator - iPhone 14 Pro Max - 2) You can test it also on simulator with LC 9.6.9
What am I doing wrong?
On line 21 I set the height of the field to the same height of the group that conatains it.
This in order to be able to scroll "the field" in the IDE, since on line 23 I exit "StartScroll" if not mobile.
On mobile instead (on the following lines) the field is FormattedHeighted, so that the mobile control can scroll it, showing only the group height.
The mobilescroller works fine if on PreOpencard I set the fullscreenmode to empty, but the display is not (objects are not entered as they should): If instead on PreOpencard I set the fullscreenmode to letterbox, the display is correct, but the scroller does not seem to work well (Simulator - iPhone 14 Pro Max - 2) You can test it also on simulator with LC 9.6.9
What am I doing wrong?
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: MobilecontrolSet native scroller on LC10. Does it works?
I can’t get on my computer to look right now but the problem that you are running into is that the mobile scroller uses the actual screen coordinates which becomes a math problem when using any fullscreenmode. Best way, in my opinion, is to write a resizeStack handler to adjust the layout.
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: MobilecontrolSet native scroller on LC10. Does it works?
I have a resizestack handler, but apparently it is not correct.
Interesting what you said, that the mobile scroller uses different screen coordinates then what I am using.
Will have to explore this.
Any suggestion on the two "parallel" world?
Essentially what I need, for example, using the various fullscreenmode, is to get the screen height according to the mobile control and the screen height according to LC. "working screenRect" ?
Interesting what you said, that the mobile scroller uses different screen coordinates then what I am using.
Will have to explore this.
Any suggestion on the two "parallel" world?
Essentially what I need, for example, using the various fullscreenmode, is to get the screen height according to the mobile control and the screen height according to LC. "working screenRect" ?
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: MobilecontrolSet native scroller on LC10. Does it works?
There was a thread about this type of issue on the list a while back. I can't test right now, but this is what was used as part of the solution:
Code: Select all
put globalloc(the topleft of grc "scan"),globalloc(the bottomright of grc "scan") into newRect
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: MobilecontrolSet native scroller on LC10. Does it works?
How stupid I was..the resizeStack wasn't running , because on preopenCard I had:
Replaced with
So, now everything works using the fullscreenmode set to empty.
(I tried with "letterBox" but there is no way I can make the mobile scroller work.)
Unfortunately, in my standalone, I get to this card coming from another card of the same stack where the fullscreenmode is set to "letterBox".
Recap:
Can someone confirm me this?
Code: Select all
set the rect of this stack to the rect of this stack
Code: Select all
resizeStack the width of this stack, the height of this stack
(I tried with "letterBox" but there is no way I can make the mobile scroller work.)
Unfortunately, in my standalone, I get to this card coming from another card of the same stack where the fullscreenmode is set to "letterBox".
Recap:
- I open my substack with fullscreenmode is set to "letterBox"
- I navigate saveral cards without changing the fullscreenmode
- Before going to my vertical list card, I set the fullscreenmode to empty
- I go next: the mobile scroller does not work
Can someone confirm me this?
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
-
- VIP Livecode Opensource Backer
- Posts: 7238
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: MobilecontrolSet native scroller on LC10. Does it works?
I haven't looked at your stack (sorry) but a couple of tips. You may already be doing some of this.
Mobile scrollers must be created dynamically when needed (usually on pre- or openCard) and deleted when leaving the card.
Set the scroll of the content field to 0 before creating the scroller. The gap you see at the top is usually caused by a field that is already partly scrolled when the mobile scroller is created. It doesn't hurt to also set the vScroll of the mobile scroller to 0 as well just to be safe.
Mobile scrollers must be created dynamically when needed (usually on pre- or openCard) and deleted when leaving the card.
Set the scroll of the content field to 0 before creating the scroller. The gap you see at the top is usually caused by a field that is already partly scrolled when the mobile scroller is created. It doesn't hurt to also set the vScroll of the mobile scroller to 0 as well just to be safe.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: MobilecontrolSet native scroller on LC10. Does it works?
Here is my updated sample stack.
Run it on the iPhone simulator
On launch, if you chose "empty" at the FullScreenMode prompt, everything works fine.
If you chose "letterBox", the mobile scroller gets screwed up.
As you see, changing the FullScreenMode going from card to card does not make a difference.
I hope you can help (it has been a long f...g week on this, now )
Run it on the iPhone simulator
On launch, if you chose "empty" at the FullScreenMode prompt, everything works fine.
If you chose "letterBox", the mobile scroller gets screwed up.
As you see, changing the FullScreenMode going from card to card does not make a difference.
I hope you can help (it has been a long f...g week on this, now )
- Attachments
-
- ScrollerTest 2.livecode.zip
- (6.66 KiB) Downloaded 61 times
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: MobilecontrolSet native scroller on LC10. Does it works?
I’ve downloaded the stack and observed the issue. Hopefully I will get some time to work with it over the next few days. My initial solution didn’t pan out though (trying to figure out global coordinates for the scroller).
I think you should be able to set the fullscreenmode upon arriving at the card (and restore upon leaving if needed). I know that the SivaSiva project that I have worked on mixes fullscreenmodes, but mainly when switching between stacks.
I think you should be able to set the fullscreenmode upon arriving at the card (and restore upon leaving if needed). I know that the SivaSiva project that I have worked on mixes fullscreenmodes, but mainly when switching between stacks.
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: MobilecontrolSet native scroller on LC10. Does it works?SOLVED
I can't believe it!
After almost a week of testing, the solution was to place a delay of 300 milliseconds before creating the mobile scroller.
Apparently the resizing of the card on opening, overlap the mobile control creation.
I don't know. I am just glad it is over.
Let me grumble a little:
Instead of diverting resources to some AI no code future project, LC should commit to its initial idea: an easy multiplatform code environment.
How long have we been waiting for unified controls that work on all platform?
Now we have an IDE field, a mobile control field for iOS and Android, an Android only native field. Same for buttons. Each one with its idiosyncrasies
Trevix
After almost a week of testing, the solution was to place a delay of 300 milliseconds before creating the mobile scroller.
Apparently the resizing of the card on opening, overlap the mobile control creation.
I don't know. I am just glad it is over.
Let me grumble a little:
Instead of diverting resources to some AI no code future project, LC should commit to its initial idea: an easy multiplatform code environment.
How long have we been waiting for unified controls that work on all platform?
Now we have an IDE field, a mobile control field for iOS and Android, an Android only native field. Same for buttons. Each one with its idiosyncrasies
Trevix
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: MobilecontrolSet native scroller on LC10. Does it works?
Glad to hear you solved the issue. Did you stick with letterbox or change to none?
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: MobilecontrolSet native scroller on LC10. Does it works?
Why don't scrolling fields just scroll?
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
-
- VIP Livecode Opensource Backer
- Posts: 7238
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: MobilecontrolSet native scroller on LC10. Does it works?
If all the Xavvi stuff happens I'm guessing they will. There's supposed to be a lot of cross platform, universal widgets. I hope they make their goal. I increased my pledge because I want to use databases without knowing anything about them.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com