I don't use a sub-stack to move from the splash to the main GUI stack. My
stub-stack (after using my hack to display the splash card correctly) does
1: load all library stacks, sets all behaviors/back scripts,... 2: a send in
10 ticks to a handler that opens the GUI stack. After that there is no
issues with getting the correct card rect. The splash stack sits invisible
in the background and houses the engine and any inclusions/extensions... Of
course in the IDE the splash stack remains open and visible, but who cares?

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-----Original Message-----
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Sannyasin Brahmanathaswami via use-livecode
Sent: Thursday, August 30, 2018 10:16 AM
To: How to use LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Re: fullscreenmode and rect of a substack on mobile device ?

Ha! One has to thank our community for "never giving up!"  That spirit alone
is worth it weight in gold -- the Indy License!

@ Brain  "Gee, why didn't I think of that!"

Not calling as substack; I use this as navigation between mainstack (the
splash screen and that has the stack files  is always open but hidden)


command portal_GoStack cardOrStackObject

    # save where we are coming from locally

    put the short name of this stack into oStackName

    [snip]

    # Attempt to fix Android by dealing with mobile controls

    # and Accelereated Rendering from here

    # We deal with the each stack case

    if oStackName <> empty then

        # this is not the first run boot of portal

        deleteAllMobileControls # will destroy all except audioPlayer

    end if

--> Variations on stack transition methods.
--> timing is important, else android crashes

    set the acceleratedRendering of stack oStackName to false

    go cardOrStackObject

        # e.g go "gems" (or this string) go card 3 of "gems"

    wait 20 milliseconds with messages

    close stack oStackName

    wait 20 milliseconds with messages

        ## this does not work! -->

        ## go to cardOrStackObject in window oStackName

end portal_GoStack

So, since the whole app is running I could get the screenrect when the
"portal" (index, TOC of the whole app) loads. And save to a local in main
lib_SIvaSiva.livecodescript (always open)

but still, I don't think screenRect will register in LC RAM *without*
running "resizestack" so how would I force that?

(thinking out loud) just running a handler to check may suffice to get the
coords of the phone.

local sMobileRect
...
send "mobileRectSet" to me in 1 second
end  portal_GoStack

command mobileRectSet
  put the screenRect into sMobileRect
end mobileRectSet

function mobileRectGet
    return sMobileRect
end mobileRectGet

I will try it

@ Ralph

Wow! That is quite a hack. I may try it. If the above  does not work.

BR


On 8/29/18 10:09 AM, Brian Milby via use-livecode wrote:

Aren't you calling this as a sub-stack?  If so, could you capture the screen
rect before the switch and pass in the data or cache to the file system and
read it in?

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to