Test the app in my Ipad

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

aebki
Posts: 126
Joined: Tue Jan 06, 2015 5:48 pm

Re: Test the app in my Ipad

Post by aebki » Tue Jan 27, 2015 12:02 am

Hi,

Any idea about why is not working what i asked in my last post?
I think it should correspond with what i saw in the lesson, but i don't manage...:-(

Thanks in advance!

Regards.

aebki
Posts: 126
Joined: Tue Jan 06, 2015 5:48 pm

Re: Test the app in my Ipad

Post by aebki » Thu Jan 29, 2015 10:14 am

Hi,

I am trying to advance but i am blocked in this problem...:-(

Any help about how to scroll in one card taller than the screen's size of my iPad?

Thanks in advance! :-)

Regards

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Test the app in my Ipad

Post by dave.kilroy » Thu Jan 29, 2015 11:16 am

Hi aebki

OK several things - first of all I'm assuming you spent some time on this lesson: http://lessons.runrev.com/m/4071/l/4442 ... chitecture - from where you appear to be I think it would bear fruit if you returned to it and spent a bit more time figuring out what is going on in the code. For example, an underlying concept of scrolling is that you need to have a LOCKED group and inside that group have controls taking up MORE SPACE than the locked size of the group.
aebki wrote: one button "btn1" in the location: 151, 563
one button "btn2" in the location: 151, 1423
and one group of these two buttons named "grpBtn"
Is the lockloc of "grpBtn" set to true? Is there anything else inside the group apart from the two buttons?

If the group doesn't contain controls that take up a larger space than you allow for it then it will never scroll. And if you do not constrain the group's size to something smaller than it's contents it will never scroll. Think of it like the Tardis in Dr Who (which is bigger on the inside) - if the group is not 'bigger on the inside' it will never scroll. and if the 'door' is not locked (i.e. the lockloc) it will never scroll.

Dave
"...this is not the code you are looking for..."

aebki
Posts: 126
Joined: Tue Jan 06, 2015 5:48 pm

Re: Test the app in my Ipad

Post by aebki » Thu Jan 29, 2015 3:15 pm

Hi Dave,

Thanks for your answer...:-)

I will have a look about the lesson again and about what you told me in your post and see...

I will come back later!!! :-)

Waow, you make me go in the past!!! :-) I liked a lot the serie Dr. Who when i was very very young!!!
I know there is a new serie named Dr.Who, but i never saw it!!!

Regards.

aebki
Posts: 126
Joined: Tue Jan 06, 2015 5:48 pm

Re: Test the app in my Ipad

Post by aebki » Thu Jan 29, 2015 5:31 pm

Hi Dave,

So i looked again at the lesson, then at my code and then to your post...:-)

Answering to your questions about "Is the lockloc of "grpBtn" set to true? Is there anything else inside the group apart from the two buttons? "

In this group i have nothing else, because my intention was only to test the scroll...so i put one button quite up and the other one quite in the bottom to need to 'scroll' if i want to see the second one.
I didn't know that the i had to set the lockloc to true...:-( And i didn't see it in the lesson...
But now it is done! :-)

What does it mean this???

"If the group doesn't contain controls that take up a larger space than you allow for it then it will never scroll."

What and how i have to 'allow for it'???

In my mind what i was thinking is that everything after the 1024 x 768 in my iPad, it will need to scroll, if i have one event to scroll ( as i have it in the script of the group ). Is for this that i put the second button in the location 151,1423, to be sure that it will be outside of the normal margins of my screen and quite in the bottom of my card as the height of my card is 1536.

Regards.

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Test the app in my Ipad

Post by dave.kilroy » Thu Jan 29, 2015 5:47 pm

aebki

It is actually a visual thing and once you 'get' it you will think it really obvious - have you tried putting the stack from the lesson on your iOS device? If you have you should 'get' what I mean by 'bigger on the inside'

Kind regards

Dave
"...this is not the code you are looking for..."

aebki
Posts: 126
Joined: Tue Jan 06, 2015 5:48 pm

Re: Test the app in my Ipad

Post by aebki » Thu Jan 29, 2015 6:43 pm

Hi Dave,

Thanks for your answer...:-)

I didn't manage to make it work in my iPad as i had one error when i tried to make the standalone...:-(

I had the error i attached in the image...

Regards.
Attachments
ErrorScrollStandalone.png
ErrorScrollStandalone.png (32.96 KiB) Viewed 8943 times

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Test the app in my Ipad

Post by dave.kilroy » Fri Jan 30, 2015 10:51 am

Hi aebki

I should think that the screenshot you uploaded was in fact the second error message and that the first one you got read "To read this web content, you need to install the Java runtime environment" - this is because LiveCode thinks you want to build for Android (because the lesson stack happened to have both iOS and Android options selected).

If building a standalone for mobile you should only build for one at a time - to build for iOS follow this checklist once you have opened the 'standalone application settings' dialog box:

1 - in the Android tab make sure the 'build for Android' checkbox is unchecked
2 - in the iOS tab make sure the 'build for iOS' checkbox is checked
3 - in the iOS tab make sure you select to build for iOS 7 or later (I'm assuming you are building with Xcode 6 or later)
4 - in the iOS tab make sure you enter a valid app id in the 'internal app id' box
5 - in the iOS tab make sure you select a valid provisioning profile (that corresponds to the app id) in the 'profile' drop-down
Screen Shot 2015-01-30 at 09.28.03.png
BTW have you considered signing up for any of the LIveCode Academies and working your way through the learning opportunities there?

Kind regards

Dave
"...this is not the code you are looking for..."

aebki
Posts: 126
Joined: Tue Jan 06, 2015 5:48 pm

Re: Test the app in my Ipad

Post by aebki » Fri Jan 30, 2015 5:47 pm

Hi Dave,

Thanks for your answer...:-)

I didn't see that was also built for Android...:-(
As i didn't one checkmark like in the icon for iOS...So, it is for this that i didn't imagine that error was because of this...:-(

So now, i could test it in my iPad and it worked...

And about the academy, i am thinking in this each time i am receiving one mail from talking about about the academy...
But for the moment it is quite complicated as i am working and traveling a lot in this moment...But maybe in six months ( normally i will travel less and have more time to do other things ) i can do this...:-)

So about my question of the other post about the meaning of your sentence:

"If the group doesn't contain controls that take up a larger space than you allow for it then it will never scroll."

i deleted all what i had in my test project and i tried to make it only with one picture ( picture 3 of the example ) and the (field c of the example) to make it more simple and try to understand it and test with it, so for this i chooses only one picture and one field to group them.

So i have this code in my stack script:

Code: Select all

on preOpenStack
   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 32
   set the compositorCacheLimit of this stack to (16 * 1024 * 1024)
end preOpenStack
This in my card script:

Code: Select all

on preOpenCard
   if the environment is not "mobile" then
      exit preOpenCard
   end if
   
   -- Use a 'scrolling' layer for our gallery.
   set the layerMode of group "gallery" to "scrolling"
   
   -- Turn on 'out-of-bounds' scrolling for our image group
   set the unboundedHScroll of group "gallery" to true
   set the unboundedVScroll of group "gallery" to true
end preOpenCard
and this in the group that i let the same name (gallery):

Code: Select all

local sScrolling
local sInitialMouseX, sInitialMouseY
local sInitialHScroll, sInitialVScroll

on mouseDown
   ## Allow the group to scroll
   put true into sScrolling
   
   ## Record the initial touch position
   put item 1 of the mouseLoc into sInitialMouseX
   put item 2 of the mouseLoc into sInitialMouseY
   
   ## Record the initial hScroll and vScroll
   put the vScroll of me into sInitialVScroll
   put the hScroll of me into sInitialHScroll
end mouseDown

on mouseMove mouseX, mouseY
   ## If the screen is being touched then
   if sScrolling then      
      ## Calculate how far the touch has moved since it started
      put mouseY - sInitialMouseY into tVChange
      put mouseX- sInitialMouseX into tHChange
      
      ## Reset the hScroll and vScroll to follow the touch
      lock screen
      set the vScroll of me to sInitialVScroll - tVChange
      set the hScroll of me to sInitialHScroll - tHChange
      unlock screen
   end if
end mouseMove

on mouseRelease
   mouseUp
end mouseRelease

on mouseUp
   put false into sScrolling
end mouseUp
The size of my stack is the same one as the size of the example stack.
the size of my picture 3 is the same size as the picture 3 of the example and locate in the same place.
and the same for the field c.

But when i try with my project i can't see nothing on my iPad, except that the keyboard is activated (as if it is waiting i will write in the field c).

There are other things that i am not considering??? I think that yes, even if i can't see what as i have nothing in the screen of my iPad...:-(

Regards.

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Test the app in my Ipad

Post by dave.kilroy » Fri Jan 30, 2015 5:51 pm

Hi aekbi
So now, i could test it in my iPad and it worked...
So, when you were trying it out on you iPad did you 'get' what I was saying about 'bigger on the inside'?
"...this is not the code you are looking for..."

aebki
Posts: 126
Joined: Tue Jan 06, 2015 5:48 pm

Re: Test the app in my Ipad

Post by aebki » Fri Jan 30, 2015 7:20 pm

Hi Dave,

Yes i could see what you told me...:-)

And for this i decided to make my own one to can test with it but it didn't work...:-(

My final is target is to make this with what i am doing in my app...
So depending on one sql Select i will have to place and show more text fields... So i can show from 0 till 20 text fields...
And i begin to locate them from the middle of my card ( 1024 x 768 ) till the end. So locating them with one normal gap the result is that the last text fields will be out of the limit of my card ( so the 'height' of the last text fields will be bigger than 768 ).

I didn't begin to code it, as i didn't manage with what i tried in my last post but my idea is to do this:

1.- Add the number of text fields depending on the sql select, locating each one with the same gap till the next text field.
2.- Group all them in one group ( with one size of 1024 x 768 ) and then lockloc.
3.- Use the same code of the group in the example and also the 'preopenCard' and the 'preopenStack' of the example.

Is it correct? Or am i making or thinking wrong???

Regards.

aebki
Posts: 126
Joined: Tue Jan 06, 2015 5:48 pm

Re: Test the app in my Ipad

Post by aebki » Sat Jan 31, 2015 10:44 am

Hi,

It is me again...:-)

In my last post i forgot to precise, even if i think that was evident! :-)

What i need is to use the vertical scroll only...so when i said put the code of the other example was put all what is concerning to the vertical scroll...

Thanks in advance!

Regards.

aebki
Posts: 126
Joined: Tue Jan 06, 2015 5:48 pm

Re: Test the app in my Ipad

Post by aebki » Mon Feb 02, 2015 4:11 pm

Hi,

This weekend i tried advance with the vertical scroll, but i didn't manage...:-(

Is it correct what i want to do and i posted in my last two posts, or am i completely wrong...:-(

Thanks in advance! :-)

Regards.

Post Reply