Scroller not displaying all info

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
Pistris
Posts: 146
Joined: Mon Jul 20, 2015 2:40 am

Scroller not displaying all info

Post by Pistris » Sat Nov 09, 2019 3:07 am

am having. problem where my scroller don't display around 80 pixels at the end

I realized that only happens on iPhone X and Xs, Xr basically the iPhones that don't use have the 9:16 aspect ratio screens

I design my stacks for iPhone 8 and add ( set the fullscreenmode of this stack to "letterbox" ) so my apps look good on the newer iPhones

if I remove ( set the fullscreenmode of this stack to "letterbox" ) then the scrollers work fine but the app stretches out and looks bad

is this a bug? is there a work around?

Edd.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5155
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Scroller not displaying all info

Post by jacque » Sat Nov 09, 2019 6:46 pm

Try fullscreenmode "showAll" or "noBorder".
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Pistris
Posts: 146
Joined: Mon Jul 20, 2015 2:40 am

Re: Scroller not displaying all info

Post by Pistris » Sat Nov 09, 2019 10:25 pm

Hi Jacques

it does not work
showAll will hide 20 percent of my user interface on iPhones X and newer
noBorder yields the same result of letterbox but does not work either

the solution I have implemented is adding an extra 72 pixels to the height of "contentRect" when creating the scroller

it is a dirty solution cause the user ends up moving the scroller for 72 pixels with the content not moving at all

how do you go about reporting bugs?

Edd.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5155
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Scroller not displaying all info

Post by jacque » Sun Nov 10, 2019 1:59 am

How do you calculate the contentRect?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Pistris
Posts: 146
Joined: Mon Jul 20, 2015 2:40 am

Re: Scroller not displaying all info

Post by Pistris » Sun Nov 10, 2019 6:59 am

The contentRect is the size of the content to be scrolled
if is an image I use the size of the image, same thing when I use fields

what am missing is the difference from the 667 pixels in the iPhones 6,7 and 8 to the 812 pixels on the iPhone X divided by two which is 72.5 pixels

to test it I made a grey image that has the last two pixel lines on the bottom in color red, when I add the 72 extra pixels to the height
of the contentRect of the scroller then am able to see the line, I don't know if on the phone am looking at one red line or both cause
they are two thin but the number is there. its ether 72 or 73 pixels that are missing

Also I get the same exact error in the Xcode iPhone emulator

I have never deployed an app on an android device so I don't know if the problem also present itself for android

Edd.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5155
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Scroller not displaying all info

Post by jacque » Sun Nov 10, 2019 6:38 pm

The symptoms sound like an incorrect or misaligned contentRect. Are you using the formattedHeight of the field? Is the field in a group? If so, is it expanded to its full height inside the group? The top of the field and top of the group should both be at zero when the scroller is created.

It would be useful to see the handler you use to create the scroller.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Pistris
Posts: 146
Joined: Mon Jul 20, 2015 2:40 am

Re: Scroller not displaying all info

Post by Pistris » Sun Nov 10, 2019 7:51 pm

everything is good sizewise
am using the scroller like I have always used it
believe me is not a code problem
this is something you can test in the Xcode emulator and see for your self

all iPhones before iPhone X work flawless and if I change the fullscreenmode it also work correctly but the gui then looks bad

yesterday I tested it on my wife's iPhone 11 and also has the same problem

am gonna add the 72 pixels for now on every scroller I make but I would like to report this and I don't know how

on preOpenCard
put the rect of group "scrollArea1" into tScrollerRect
put 0,0,100,500 into tContentRect
mobileControlCreate "scroller", "loremScroll"
mobileControlSet "loremScroll", "rect", tScrollerRect
mobileControlSet "loremScroll", "contentRect", tContentRect
mobileControlSet "loremScroll", "visible", true
mobileControlSet "loremScroll", "scrollingEnabled", true
mobileControlSet "loremScroll", "vIndicator", true
mobileControlSet "loremScroll", "vScroll", 0
end preOpenCard

group scrollArea1 measures 100x250. and the image that scrolls is 100x500

its not coding error, it has to be some error on live code 9.5 cause I have older scrollers that don't exhibit that behavior

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5155
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Scroller not displaying all info

Post by jacque » Sun Nov 10, 2019 9:26 pm

The problem is that you are specifying hard-coded values for the contentRect, which won't work on every device. Try this instead:

Code: Select all

put  ("0,0," & (the formattedwidth of grp "myGrp") & "," & the formattedheight of grp "myGrp") into tContentRect
Substitute the name of your group for "myGrp".

This is an abbreviated version of what I use:

Code: Select all

command createScroller pName -- scrolling grps
  -- pName = short name of grp
  put the rect of grp pName into tRect
  mobileControlCreate "scroller", pName
  mobileControlSet pName, "rect", tRect
  put  ("0,0," & (the formattedwidth of grp pName) & "," & the formattedheight of grp pName) into tContentRect
  mobileControlSet pName, "contentRect", tContentRect
  mobileControlSet pName, "visible", true
  send "updateScroller pName" to me in 350 milliseconds -- needs an idle, otherwise fails
end createScroller
Pass the name of the group you need to scroll in the pName paramter:

Code: Select all

createScroller "myGroup"
The handler creates a native scroller with the same name as the group. It is also important to set the scroll of the group to zero before creating the scroller, otherwise it may be misaligned. You can set the scroll of both the group and its scroller to something else after the scroller has been instantiated.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Pistris
Posts: 146
Joined: Mon Jul 20, 2015 2:40 am

Re: Scroller not displaying all info

Post by Pistris » Mon Nov 11, 2019 6:45 am

same problem
the reason am hard coding it is because I had to manually test specific values to make sure that the formated height was the right value

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5155
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Scroller not displaying all info

Post by jacque » Mon Nov 11, 2019 8:27 am

Okay. You can report bugs here: http://quality.livecode.com. You'll have to open a free account, it doesn't work with your forum login. If you submit a bug report let us know, I'd like to follow it.

There is a bug in Android 10 where the bottom pixels are cut off the card. It's been fixed for the next release. Maybe you've found something similar in iOS.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5155
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Scroller not displaying all info

Post by jacque » Mon Nov 11, 2019 8:36 am

One last question. Is the field inside the group sized to show all its text?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Pistris
Posts: 146
Joined: Mon Jul 20, 2015 2:40 am

Re: Scroller not displaying all info

Post by Pistris » Mon Nov 11, 2019 7:21 pm

Yes

and the last test is with an image not a field so that way I make sure nothing is hidden, but still same problem

am gonna install an older version of live code and see what happens

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5155
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Scroller not displaying all info

Post by jacque » Tue Nov 12, 2019 10:19 pm

Were you able to submit a bug report? Yesterday I think I hit the same thing on Android using a taller phone. The formattedHeight of fields and images is not being calculated correctly, it's too short.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Bug Triage”