Page 1 of 2

iPad card off screen

Posted: Sun Mar 26, 2023 12:40 am
by vcirilli
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?

Re: iPad card off screen

Posted: Sun Mar 26, 2023 3:24 am
by dunbarx
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

Re: iPad card off screen

Posted: Sun Mar 26, 2023 9:51 am
by richmond62
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.

Re: iPad card off screen

Posted: Sun Mar 26, 2023 10:42 am
by Klaus
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

Re: iPad card off screen

Posted: Thu Mar 30, 2023 9:07 pm
by vcirilli
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.

Re: iPad card off screen

Posted: Thu Mar 30, 2023 11:33 pm
by dunbarx
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

Re: iPad card off screen

Posted: Thu Mar 30, 2023 11:34 pm
by dunbarx
vcirilli.

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

Craig

Re: iPad card off screen

Posted: Fri Mar 31, 2023 7:24 am
by richmond62
Craig,

What do you mean by 'more robust'?

Re: iPad card off screen

Posted: Fri Mar 31, 2023 2:04 pm
by dunbarx
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

Re: iPad card off screen

Posted: Fri Mar 31, 2023 2:35 pm
by Klaus
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) :-)

Re: iPad card off screen

Posted: Fri Mar 31, 2023 4:53 pm
by dunbarx
@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

Re: iPad card off screen

Posted: Fri Mar 31, 2023 4:56 pm
by dunbarx
@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

Re: iPad card off screen

Posted: Fri Mar 31, 2023 6:11 pm
by SparkOut
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

Re: iPad card off screen

Posted: Fri Mar 31, 2023 7:18 pm
by dunbarx
@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

Re: iPad card off screen

Posted: Sat Apr 01, 2023 5:43 pm
by jacque
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.