Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2525F17F2C for ; Sat, 10 Jan 2015 04:38:47 +0000 (UTC) Received: (qmail 41157 invoked by uid 500); 10 Jan 2015 04:38:43 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 41114 invoked by uid 500); 10 Jan 2015 04:38:43 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 41103 invoked by uid 99); 10 Jan 2015 04:38:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Jan 2015 04:38:42 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of kevin.godell@gmail.com does not designate 162.253.133.43 as permitted sender) Received: from [162.253.133.43] (HELO mwork.nabble.com) (162.253.133.43) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Jan 2015 04:38:37 +0000 Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 1C0FE1010F9D for ; Fri, 9 Jan 2015 20:38:18 -0800 (PST) Date: Fri, 9 Jan 2015 20:36:13 -0800 (PST) From: "kevin.godell" To: dev@flex.apache.org Message-ID: <1420864573206-44261.post@n4.nabble.com> In-Reply-To: <1420839974859-44260.post@n4.nabble.com> References: <1420685523769-44217.post@n4.nabble.com> <1420837914892-44257.post@n4.nabble.com> <1420838152886-44259.post@n4.nabble.com> <1420839974859-44260.post@n4.nabble.com> Subject: Re: Can somebody verify my code fix for bug FLEX-34712? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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.