Page 1 of 1

iPad layout and scripting

Posted: Sat Dec 11, 2010 12:19 am
by ahcho
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

Re: iPad layout and scripting

Posted: Sat Dec 11, 2010 5:01 am
by wsterdan
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

Re: iPad layout and scripting

Posted: Sat Dec 11, 2010 5:12 pm
by ahcho
Thanks!