flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kevin.godell" <kevin.god...@gmail.com>
Subject Re: Can somebody verify my code fix for bug FLEX-34712?
Date Sat, 10 Jan 2015 04:36:13 GMT
The problem: when systemManager_resizeHandler is called,
calculatePopUpPosition()'s x and y may not be correct yet. If waiting a
moment later by using callLater(), then the x and y are correct, and now
would be a good time to call invalidatePosition(). I propose to wrap the
code called in systemManager_resizeHandler in either a separate function
called via callLater(someOtherFunctionToCall), or wrap it in an anoymous
function inside callLater(function():void{//do stuff}). I am not sure if
anonymous functions are considered good practices or not.

I tried listening to other events to find the time when the x and y of
calculatePopUpPosition() would be correct, and only found that to be on the
render event of the owner, but render gets called way too many times. Tried
listening to stage resize, and some other events that I cant remember right
now. None of them were called late enough for the x and y to be correct.

Update to the commit: removed listeners to stage orientation change and the
corresponding variable to flag the event. This new commit actually provides
the best visual experience of the callout snapping into position after
rotating the screen.


View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Can-somebody-verify-my-code-fix-for-bug-FLEX-34712-tp44217p44261.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

View raw message