avoid button deformation

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: avoid button deformation

Post by fko2 » Sun Mar 08, 2015 4:05 pm

Hi Jacque,

Ok, so i will try without the '@medium'...
For the rest i was following this lesson i think. So i will see if this will work.

Regards.
fko

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: avoid button deformation

Post by fko2 » Sun Mar 08, 2015 4:29 pm

Hi Jacque,

So now i could see how my image changed from the normal image to one '@high' or '@extra-high':-)
Even if this made it in the iPhone simulator and not in the iPad simulator as i thought!
Anyway it is not a big problem if in both is loading the one with more density, i think! :-)

So, the half of my problem is solved, now i need only or the hidden first row in my scrolling.

Regards,
fko

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: avoid button deformation

Post by fko2 » Mon Mar 09, 2015 6:22 pm

Hi,

I am still blocked with the scrolling in the iPad simulator. All what i tried is not working.
So,still the same result! :-(
Is working well in iPhone simulator ( the size i designed everything ), but not when i try in iPad simulator!:-(

Help, please!

Regards,
fko

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: avoid button deformation

Post by fko2 » Tue Mar 10, 2015 7:18 pm

Hello,

I begin to feel desperate, as all what i am trying is not working to control this vertical scroller in one ipad (when everything is designed in one iPhone card and then using the fullScreenMode). Always is hiding the first row!:-(
Anyone of the gurus of this forum, can tell me what is happening and how should i solve this? After quite one week 'fighting' with this, i have no idea of what else i have to do! :-(
And if there is no explanation, as apparently the code i posted before seemed to be ok, one little example of this working it will be so much appreciated too! :-) :-)

As a reminder i have the first button ('do not enter' image) in the location 35,187, and followed in the right i have one field, and then two buttons more.
And the next row of this group is with one gap of 30 pixels of this first row.
In this example i put till the row 50.
And once i had all the buttons and fields placed in their correct position, then i used the option "Group Selected", and then i locked its location!

And as i mentioned in other posts, the problem is 'only' when i scroll down and up in the iPad. In the iPhone is working well!

Thanks in advance for your help!

Regards,
fko

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

Re: avoid button deformation

Post by jacque » Tue Mar 10, 2015 10:28 pm

I think no one is answering because we don't know. At least, I can't think of a reason. Sorry. Maybe someone else has an idea. I think the most likely problem is the rect assigned to the content region, so try looking at that.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: avoid button deformation

Post by Simon » Tue Mar 10, 2015 10:53 pm

Are you using formattedHeight? or a pixel height?
Could you post your stack.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: avoid button deformation

Post by fko2 » Wed Mar 11, 2015 12:14 pm

Hi Simon,

this is the code i have for the scrolling:

Code: Select all

      mobileControlCreate "scroller", "groupScroller2Iphone"
      put the result into sScrollerListIDIphone
      put the topLeft of group "objectsListIphone" into tRect2
      put the right of group "objectsListIphone" into item 3 of tRect2
      put the height of this card into item 4 of tRect2
      
      put the formattedWidth of group "objectsListIphone" into tWidth
      put the formattedHeight of group "objectsListIphone" into tHeight
      mobileControlSet sScrollerListIDIphone,"rect", tRect2
      mobileControlSet sScrollerListIDIphone, "contentRect", (0,0,tWidth,tHeight)
      mobileControlSet sScrollerListIDIphone, "visible", "true"
      
      iphoneControlSet sScrollerListIDIphone, "canBounce", "true"
      iphoneControlSet sScrollerListIDIphone, "scrollingEnabled", "true"
      iphoneControlSet sScrollerListIDIphone, "canScrollToTop", "true"
      iphoneControlSet sScrollerListIDIphone, "lockDirection", "true"
      iphoneControlSet sScrollerListIDIphone, "decelerationRate", "normal"
      iphoneControlSet sScrollerListIDIphone, "pagingEnabled", "false"
      iphoneControlSet sScrollerListIDIphone, "indicatorStyle", "black"
      iphoneControlSet sScrollerListIDIphone, "vIndicator", "true"
      iphoneControlSet sScrollerListIDIphone, "delayTouches", "true"
      iphoneControlSet sScrollerListIDIphone, "canCancelTouches", "true"
      iphoneControlSet sScrollerListIDIphone, "hscroll", 0
      iphoneControlSet sScrollerListIDIphone, "vscroll", 0
So, answering to your question, i am using formattedHeight.

Regards,
fko

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: avoid button deformation

Post by fko2 » Wed Mar 11, 2015 4:58 pm

Hi,

it is me again.

Was this what you need it or maybe you need another thing?

Regards,
fko

strongbow
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 135
Joined: Mon Jul 31, 2006 1:39 am
Location: New Zealand, Australia, Germany, Japan
Contact:

Re: avoid button deformation

Post by strongbow » Thu Mar 12, 2015 8:40 am

Have you tried

mobileControlSet sScrollerListIDIphone,"rect", the rect of group "objectsListIphone"

rather than using the height of the card for part of the rect?

Just wondering why you set up the rect otherwise?

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: avoid button deformation

Post by fko2 » Thu Mar 12, 2015 11:05 am

Hi strongbow,

Thanks for the answer!

So, putting this line

Code: Select all

mobileControlSet sScrollerListIDIphone,"rect", the rect of group "objectsListIphone"
in place of

Code: Select all

      put the topLeft of group "objectsListIphone" into tRect2
      put the right of group "objectsListIphone" into item 3 of tRect2
      put the height of this card into item 4 of tRect2      
      mobileControlSet sScrollerListIDIphone,"rect", tRect2
then nothing is moving! :-( Is i have no scroller.
It should work with the line you suggested me in place of this four i have? Or maybe should i change something else?

And Jacque, i just saw your post now! So for this i didn't answer you before! :-(
The other day, i only saw the one of Simon...This is the consequence to be feel blocked and desperate i think. I was only looking for the answer / advice / example that could solve my problem.
And now when i entered again in the forum, i looked again at the post of Simon to see if what i answered him is what he asked me, and it is when i saw above your answer.

So yes, maybe the reason is what you say, even if in my mind this was (or more 'is' than 'was') not easy to imagine.
I don't know all you, but i have the impression that you, Klaus, Jean-Marc, Bernd, Dave, Dixie, Simon, and others, that now i am forgetting, are formidable coders!
And as my scroller is working well in iPhone card, i thought that maybe was one 'very little thing' what was not making it work in iPad (using the fullScreenMode "noBorder" as everything is designed for iPhone).
So to reproduce my issue and then solve it, i thought was not very difficult for all you as Livecode gurus.

But yes, maybe there is no solution as you said! :-( Even if i will try to be optimistic and trust all you! :-)
Because really i don't know how to advance or to solve it after one whole week trying and trying all what i could with my knowledge.

Regards,
fko

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: avoid button deformation

Post by Dixie » Thu Mar 12, 2015 11:30 am

post your stack...

strongbow
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 135
Joined: Mon Jul 31, 2006 1:39 am
Location: New Zealand, Australia, Germany, Japan
Contact:

Re: avoid button deformation

Post by strongbow » Thu Mar 12, 2015 11:52 am

Have you put debugging code into your scripts yet?

i.e.
put the rect of <your object>

which will put the message out to the system log or similar for the simulator or device?

If you haven't done this yet, you need to learn how to do it.

And post your stack for anyone to have a chance to help further.

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: avoid button deformation

Post by fko2 » Thu Mar 12, 2015 1:57 pm

Hi,

I attached my stack.
If you will try with the iPhone simulator, you can see how it is scrolling down and then up well!
But not when you try this in the iPad simulator.

Regards,
fko
Attachments
MainIphone.livecode.zip
(21.66 KiB) Downloaded 180 times

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: avoid button deformation

Post by LCNeil » Thu Mar 12, 2015 2:05 pm

This is a performance limitation of the iPad sim (due to its pretty high resolution). I set the layermode of your group to "scrolling" and deployed it to a physical iPad (air) and scrolling of the group is smooth as silk :)

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: avoid button deformation

Post by fko2 » Thu Mar 12, 2015 2:46 pm

Hi Neil,

In my ipad2 ( my real device ) is not working!:-(
I tried once again changing the layer mode to 'scrolling' as you said, but even like this is not scrolling well!

Regards,
fko

Post Reply

Return to “iOS Deployment”