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.

https://github.com/kevinGodell/flex-sdk/commit/706eb343b83085fdf339026cdb8f27124896f63d#diff-0a74af61d4412a0cf5a0b5b00b2ccad3






--
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.

Reply via email to