Beginner: Card/Screen size problem

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

Beginner: Card/Screen size problem

Post by wsterdan » Sat Oct 30, 2010 6:10 am

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
Last edited by wsterdan on Sat Oct 30, 2010 1:03 pm, edited 1 time in total.

moonmonkey
Posts: 5
Joined: Tue Oct 26, 2010 10:50 am

Re: Beginner: Card/Screen size problem

Post by moonmonkey » Sat Oct 30, 2010 11:50 am

Same problem here, very annoying.

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Re: Beginner: Card/Screen size problem

Post by Janschenkel » Wed Nov 03, 2010 6:06 am

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.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

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

Re: Beginner: Card/Screen size problem

Post by wsterdan » Wed Nov 03, 2010 6:57 am

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

Post Reply