iPad card off screen

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

vcirilli
Posts: 12
Joined: Sat Sep 03, 2022 7:58 pm

iPad card off screen

Post by vcirilli » Sun Mar 26, 2023 12:40 am

I have a standard iPad stack set up in portrait mode.
After a LC relaunch, when I open this stack, it's off the top of the screen.
The top bar used for repositioning is off screen, the y- cord comes up at 378, 646 is the actual bottom of the LC menu where my other apps
usually go by default.
I have to go into property inspector and reset the top coordinator of the 1st stack to get at the top of the window to reposition it.
Is this a known issue?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: iPad card off screen

Post by dunbarx » Sun Mar 26, 2023 3:24 am

Hi.

Not sure what is going on, but until you figure it out, put an openCard handler in card 1 and set the topLeft of the card to something visible.

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: iPad card off screen

Post by richmond62 » Sun Mar 26, 2023 9:51 am

Well, I largely design silly little standalones for Linux machines with a screen resolution of 1024 by 720, but do my work on a Macintosh with a much larger screen.

So I ALWAYS have this in my stackScript:

Code: Select all

on openStack
   set the loc of me to the screenLoc
end openStack
So, wherever either the stack or the standalone derived from it is deployed, it ALWAYS opens slap-bang in the middle of the screen.

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

Re: iPad card off screen

Post by Klaus » Sun Mar 26, 2023 10:42 am

Hi vcirilli,

do you set "the fullscreenmode" of your stack? If yes, to what?
Do you have a "resizestack" handler in your stack or card script?

Maybe you want to take a look at my example stack here:
https://www.dropbox.com/s/gmls3bfte96q7 ... e.zip?dl=0
It shows how to resize your stack to all available devices with different screen sizes and is well commented.

Best

Klaus

vcirilli
Posts: 12
Joined: Sat Sep 03, 2022 7:58 pm

Re: iPad card off screen

Post by vcirilli » Thu Mar 30, 2023 9:07 pm

dunbarx wrote:
Sun Mar 26, 2023 3:24 am
Hi.
Not sure what is going on, but until you figure it out, put an openCard handler in card 1 and set the topLeft of the card to something visible.
Craig
Helpful thanks.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: iPad card off screen

Post by dunbarx » Thu Mar 30, 2023 11:33 pm

Richmond.
So I ALWAYS have this in my stackScript:
It is more robust to put that sort of thing in the card 1 script.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: iPad card off screen

Post by dunbarx » Thu Mar 30, 2023 11:34 pm

vcirilli.

Glad it helped, but let us know what you find that such a thing is happening...

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: iPad card off screen

Post by richmond62 » Fri Mar 31, 2023 7:24 am

Craig,

What do you mean by 'more robust'?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: iPad card off screen

Post by dunbarx » Fri Mar 31, 2023 2:04 pm

Richmond.

I believe that having a "must run at stack opening" handler is best placed in the script of the first card as opposed to the script of the stack itself. I cannot quite recall why this should be, but I bet Jacque will chime in soon and tell us both.

Craig

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

Re: iPad card off screen

Post by Klaus » Fri Mar 31, 2023 2:35 pm

Hi Craig,

if you have substack(s) that do not have an pre-/openstack handler of its/their own,
then these handlers are executed if put into ther stack script of the mainstack!
-> Message Hierarchie!


Best

Klaus (not Jacque) :-)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: iPad card off screen

Post by dunbarx » Fri Mar 31, 2023 4:53 pm

@Not Jacque.

I think there is a reason even with a single stack, that is, it is not exactly the same to place such a handler in the stack script as opposed to the script of cd 1.

I could be wrong, but will wait for the real Jacque...

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: iPad card off screen

Post by dunbarx » Fri Mar 31, 2023 4:56 pm

@Wannabe Jacque.

It may have something to do with the order that such scripts are loaded. I have forgotten the advantages, if in fact there really ever were any.

But when the real Jacque comes we will see...

Craig

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: iPad card off screen

Post by SparkOut » Fri Mar 31, 2023 6:11 pm

We have discussed this before, and here is a thread with a good examination of it, starting with another not jacque point of view

https://forums.livecode.com/viewtopic.p ... 31#p215231

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: iPad card off screen

Post by dunbarx » Fri Mar 31, 2023 7:18 pm

@actualSparkout.

I wrote above:
It may have something to do with the order that such scripts are loaded
So can you give, since card 1 receives messages before the stack in which it lives, an example of a working advantage?

I recall things I made years ago where an intractable problem was solved by doing just that, but cannot think of what they were.

Craig

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: iPad card off screen

Post by jacque » Sat Apr 01, 2023 5:43 pm

My notariety precedes me.

The simple reason is the message path, as suggested. Placing the handler in the first card of the mainstack ensures it will only run once at startup. In a standalone the mainstack script is always in use, so any time another stack is opened, whether substack or another mainstack, it will run and possibly conflict. I always put openstack and preOpenStack handlers in the first card script if they are intended to only run at startup or when the stack is first opened in the IDE.

If you only have a single stack open and it never opens any other stack and it is never put in use, then it probably doesn't matter.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply