Screen layout using the Test Simulator

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
dazza the stag
Posts: 44
Joined: Sat May 17, 2014 1:48 pm

Screen layout using the Test Simulator

Post by dazza the stag » Sun May 25, 2014 5:23 pm

ok - Im sure this is something really basic but i cant figure it out. I am writing my first app and have 4 cards. I am not a paid up member yet and therefore can't test it on a device so i decided to view it on the Test Simulator.

When I open this not everything on my card appears on the test, i.e. its obvious that I haven't set up the layout of my card properly to fit onto a screen.

I have done lots of searching and ready about Livecodes new ability to adapt the layout to any device the app is opened on etc but does this not apply to the test simulation.

Surely there is an easy way to set the size of the card up so I know when placing items they are going to look ok on say an iPhone 5 ?

Is there a lesson somewhere on this

Thanks a million

Dazza

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

Re: Screen layout using the Test Simulator

Post by Simon » Sun May 25, 2014 5:32 pm

Hi Dazza,
Have you set a "fullScreenMode"?
http://newsletters.livecode.com/novembe ... tter3.html

Simon
Edit; Not to you Dazza but... why is this one not camel case in the dictionary?
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

dazza the stag
Posts: 44
Joined: Sat May 17, 2014 1:48 pm

Re: Screen layout using the Test Simulator

Post by dazza the stag » Sun May 25, 2014 5:54 pm

Thanks Simon

I had read through that page and I had added
on preOpenStack
set the fullscreenmode of me to "exactFit"
end preOpenStack

to the initial card script of my app, I assume I interpreted the instructions correctly ? I then actioned the bit about setting up my stack to run on a simulator
Screen Shot 2014-05-25 at 17.48.53.png
But that didn't seem to help either. Even though there is this new resizing option sure it still matters where I place each item on the card i.e. the distance between some text and a button, I know Livecode can then rescale it later but surely I need to ensure that it is to my liking to start with ? Otherwise I could just be trying to put too much text on one line that will never fit onto an iPhone screen

Dazza

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

Re: Screen layout using the Test Simulator

Post by Simon » Sun May 25, 2014 6:01 pm

Not sure but
on preOpenStack
set the fullscreenmode of me to "exactFit"
end preOpenStack
Should be added to the stack script not card.

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

Klaus
Posts: 14205
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Screen layout using the Test Simulator

Post by Klaus » Sun May 25, 2014 6:28 pm

Hi Simon,

"pre-/openstack" will also be send to the first card of a stack!
If not handled, it will be passed to the stack script.

A good way to prevent substacks to execute the "pre-/openstack"
handlers of the mainstack! :D


Best

Klaus

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

Re: Screen layout using the Test Simulator

Post by Simon » Sun May 25, 2014 6:34 pm

Hi Klaus,
Ahh so the message path is active from the get go.
Never thought about that.
It means that a field script can hold the pre/openStack message and get it even earlier, Wow.

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

dazza the stag
Posts: 44
Joined: Sat May 17, 2014 1:48 pm

Re: Screen layout using the Test Simulator

Post by dazza the stag » Sun May 25, 2014 6:35 pm

I think I am - Im getting to it by right clicking on Buy to Let Calculator as on the attached pic and then
Screen Shot 2014-05-25 at 18.30.50.png
and then choosing edit script and placing the code there
Screen Shot 2014-05-25 at 18.31.09.png
Is that correct ?

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

Re: Screen layout using the Test Simulator

Post by Simon » Sun May 25, 2014 7:03 pm

Yes, that looks correct.
Sorry, it's Sunday and my imagination is slow so I can't think of what could be causing the problem ("When I open this not everything on my card appears on the test...").
If you can post your stack I'll take a look at it.

Here is my NDA:
I promise not to. :D

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

dazza the stag
Posts: 44
Joined: Sat May 17, 2014 1:48 pm

Re: Screen layout using the Test Simulator

Post by dazza the stag » Sun May 25, 2014 8:23 pm

Stupid question number 2 - How do I post a stack ?

dazza the stag
Posts: 44
Joined: Sat May 17, 2014 1:48 pm

Re: Screen layout using the Test Simulator

Post by dazza the stag » Sun May 25, 2014 8:33 pm

Screen Shot 2014-05-25 at 20.29.53.png
Just thought I would show another example of what I mean for clarity, as you can see the BackButton shows on the screen however the text above it which is no further left is cut short, so to is the word "Years"

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

Re: Screen layout using the Test Simulator

Post by Simon » Sun May 25, 2014 9:38 pm

Yep, I see it's all messed up.
To post your stack just zip it first.

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

dazza the stag
Posts: 44
Joined: Sat May 17, 2014 1:48 pm

Re: Screen layout using the Test Simulator

Post by dazza the stag » Sun May 25, 2014 9:51 pm

remember this is my first app after only about a week - so don't laugh too loud !

I really do appreciate you looking

Dazza
Attachments
Private Banking.livecode.zip
(6.6 KiB) Downloaded 218 times

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

Re: Screen layout using the Test Simulator

Post by Simon » Mon May 26, 2014 1:17 am

Hi Dazza,
You are absolutely 100% correct!
It's all messed up. (I mean the resizing not your stack)

But a couple of things to help you.
1) I think I read the minimum size font is 11 pt, and thats OK if you don't mind using a microscope. I think it's more like 14 and for a happy user it's 18 (retina madness).
2) Pick a standard size for your stack, for iPhone it's 320x480, 640x960,640x1136 (I think 640x960 is for you).
3)Go ahead a pick Helvetica for your font, system fonts don't match iPhone fonts. (you can look up available fonts on iPhone and pick another). From the stack inspector select the font and it will be applied to all of your fields that don't have a font selected. I think this will probably help you the most as it's the fields you are having trouble with.
4)Bring that "Clear" button into the stack, having outside like that just makes things crazy.
5)Yeah, you have to give a little when building these things, add a little extra space in the fields, don't use "Fit Content".

The above is just my observations and NOT fact, others may have different views.

I think setting the font is actually all you need. After you do that you'll see the stack looks just like the emulator. Try it first.

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

Klaus
Posts: 14205
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Screen layout using the Test Simulator

Post by Klaus » Mon May 26, 2014 11:52 am

Hi Simon,
Simon wrote:It means that a field script can hold the pre/openStack message and get it even earlier, Wow.
not sure I get this one!?
The "pre-/openstack" message is sent to the first CARD not to any object on the first card!



Best

Klaus

dazza the stag
Posts: 44
Joined: Sat May 17, 2014 1:48 pm

Re: Screen layout using the Test Simulator

Post by dazza the stag » Mon May 26, 2014 2:28 pm

Simon - your a star - thank you very much

I made all the suggestions you mentioned and its all now as I was expecting to see. Such simple alterations clearly make a huge difference.

Each suggestion made a difference so thanks for your time and effort. Its a shame that basics like this are not explained somewhere, unless of course they are and i have missed them. I know when I searched the forum despite making the search quite specific I got a message back saying that it was ignoring every word that I had entered because they were too common !

Onwards and upwards.......

Dazza

Post Reply