OK with the help of Brian off list I go something going! But I have a
confession to make and a bug to report
1) in middle of the script, in logging, I used a
Put "somevalue" into fld "log"
Which of course removed anything before that, including a "resize" stack, which
had log entries.
2) But, it not all my fault (hehe) With Brian's help (and Richard
persistently point by point "what should happen, if is it not, it is a
bug...,") I learned that
a) orientationChanged fires first, and then
b) resizestack, x,y,oldX,oldY fire next and *then* it renders.
(needs to be in the dictionary!)
Simple! I made a clone of the production stack, copied the new behavior script
made Brian's with help (Thanks Brian!) and made a little light weight
standalone for testing and it worked.
So I thought "ahha gotcha now" and copied the stack into my modular framework,
back in, and tested it. It did not work! But they are virtually identical? What
could be wrong? The only thing was how it was opened, by the IDE and by my code?
Well the reason for my going around in circles about resizestack not firing,
is, because the resizestack is not fired if you "go to stack in window..."
if (cardOrStackObject is not among the items of tLandScapeModeStacks) AND \
(trueword 2 of cardOrStackObject is not among the items of
tLandScapeModeStacks) AND \
(oStackName is not among the items of tLandScapeModeStacks) then
--go cardOrStackObject in stack oStackName
# you do this, you get nothing in resizestack
--close stack oStackName
# I changed to this:
close stack oStackName
go cardOrStackObject
else
ntInfo "close one; open next"
close stack oStackName
go cardOrStackObject
end if
And so, I was fight my geometry handlers when it was in really the navigation,
from one stack to the next. All of the above gets reduced to :
ntInfo "close one; open next"
close stack oStackName
go cardOrStackObject
BR
On 5/13/19, 6:26 PM, "use-livecode on behalf of Brian Milby via use-livecode"
<[email protected] on behalf of
[email protected]> wrote:
I'll send a copy of the stack separately, but here are my thoughts:
- Caveat that I only have an Amazon Fire available for testing
- resizeStack does get called, before openCard on card Loader
- no field "log" exists on card "Loader" which is probably why resizeStack
was not working
- I added "addLog" and "clearLog" handlers to allow for logging from any
card
- when launched, I get a "resizeStack 600,952,414,736" call
- nav bar is never positioned off screen
I made the above notes on LC 9.0.1; I then installed 9.0.4 and found
different issues
- there is a visible shift of the log box (corrected with below changes)
- moved script locals to preOpenStack so they would be available sooner
- moved orientation code to preOpenStack
Thanks,
Brian
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode