Page 1 of 1

Beginner: Card/Screen size problem

Posted: Sat Oct 30, 2010 6:10 am
by wsterdan
Hi;

I decided to spend the next two weeks testing the intro Mobile pack for iOS (my goal is to see how far along on a personal project I can get before investing in the full package) and I've run into a snag right near the beginning.

I'm building an app for my iPad on my 15" MacBook Pro (screen size: 1440 x 900).

Problem #1: I build cards at 1024 x 768 and 768 x 1024, but in the portrait mode I can't zoom out to see the whole card and find myself continually changing the location on the card; am I missing something incredibly simple, or do I actually need a larger monitor?

Problem #2: After saving my cards, quitting LiveCode, then launching the cards again, they've resized themselves to fit the vertical height of my screen. Both portrait and landscape cards are now cropped to 749 pixels vertically instead of 1024 or 768. I can resize the card and, by changing its location, I find that buttons at the bottom of the card are still there, but this is an incredibly annoying process. Again, am I missing something obvious?

-- Walt Sterdan

Re: Beginner: Card/Screen size problem

Posted: Sat Oct 30, 2010 11:50 am
by moonmonkey
Same problem here, very annoying.

Re: Beginner: Card/Screen size problem

Posted: Wed Nov 03, 2010 6:06 am
by Janschenkel
The behavior you see has everything to do with the windowBoundingRect property. This is the height of your main monitor; minus the dock/taskbar height; minus the menubar height (on MacOSX); and minus the space needed for the LiveCode toolbar (if you're running inside the LiveCode IDE). The simplest solution is to set the size of your stack by handling the preOpenStack message.
Something like this should do the trick:

Code: Select all

on preOpenStack
   local tRectangle
   put the windowBoundingRect into tRectangle
   put item 1 of tRectangle + the minWidth of me into item 3 of tRectangle
   put item 2 of tRectangle + the minHeight of me into item 4 of tRectangle
   set the rectangle of me to tRectangle
end preOpenStack
HTH,

Jan Schenkel.

Re: Beginner: Card/Screen size problem

Posted: Wed Nov 03, 2010 6:57 am
by wsterdan
Janschenkel wrote: Something like this should do the trick:

Code: Select all

on preOpenStack
   local tRectangle
   put the windowBoundingRect into tRectangle
   put item 1 of tRectangle + the minWidth of me into item 3 of tRectangle
   put item 2 of tRectangle + the minHeight of me into item 4 of tRectangle
   set the rectangle of me to tRectangle
end preOpenStack
HTH,
Jan Schenkel.
It helped immensely, thanks very, very much. That certainly takes a lot of the sting out of using LiveCode.

Again, my thanks, it's greatly appreciated.

-- Walt Sterdan