iPad layout and scripting

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ahcho
Posts: 2
Joined: Fri Dec 10, 2010 10:37 pm

iPad layout and scripting

Post by ahcho » Sat Dec 11, 2010 12:19 am

Hello!

New to liveCode so please bear with me.

1. I am trying to set up an iPad application. The width of the stack window is variable so some of my test buttons and objects fall off the actual screen. Is there an option to lock it to the same size as the iPad screen?

2. Is there a resource here that can provide a reference for the scripting portion of LiveCode?

Thanks!

Aaron

wsterdan
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 16
Joined: Sat Oct 30, 2010 2:57 am

Re: iPad layout and scripting

Post by wsterdan » Sat Dec 11, 2010 5:01 am

Hi;

Not sure if this is what you mean by the width of the stack window being variable but if you want your stack to always open to an iPad size, you can use this in your stack script (originally posted to me by Jan Schenkel... thanks again Jan):

Code: Select all

on preOpenStack
      local tRectangle
      put the windowBoundingRect into tRectangle
   put 200 into item 1 of tRectangle
   put 200 into item 2 of tRectangle
      put item 1 of tRectangle + 1024 into item 3 of tRectangle
      put item 2 of tRectangle + 768 into item 4 of tRectangle
      set the rectangle of me to tRectangle
end preOpenStack
This opens in iPad-sized stack in horizontal mode; the first two numbers of the rectangle position the stack, the second two are the dimensions.

Hope that helps.

-- Walt Sterdan

ahcho
Posts: 2
Joined: Fri Dec 10, 2010 10:37 pm

Re: iPad layout and scripting

Post by ahcho » Sat Dec 11, 2010 5:12 pm

Thanks!

Post Reply

Return to “iOS Deployment”