You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2015/11/18 22:20:01 UTC

git commit: [flex-sdk] [refs/heads/develop] - This closes #37

Repository: flex-sdk
Updated Branches:
  refs/heads/develop aee1a2fa0 -> 813fb8eed


This closes #37


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/813fb8ee
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/813fb8ee
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/813fb8ee

Branch: refs/heads/develop
Commit: 813fb8eed7fd85fd6a409bb398dbff51bab96124
Parents: aee1a2f
Author: Harbs <ha...@in-tools.com>
Authored: Wed Nov 18 23:19:53 2015 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Nov 18 23:19:53 2015 +0200

----------------------------------------------------------------------
 .../airspark/src/spark/components/WindowedApplication.as     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/813fb8ee/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/airspark/src/spark/components/WindowedApplication.as b/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
index 8843e5a..6ca3094 100644
--- a/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
+++ b/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
@@ -690,7 +690,7 @@ public class WindowedApplication extends Application implements IWindow
      */
     override public function get maxHeight():Number
     {
-        if (nativeWindow && !maxHeightChanged)
+        if (nativeWindow && nativeWindow.maxSize && !maxHeightChanged)
             return nativeWindow.maxSize.y - chromeHeight();
         else
             return _maxHeight;
@@ -738,7 +738,7 @@ public class WindowedApplication extends Application implements IWindow
      */
     override public function get maxWidth():Number
     {
-        if (nativeWindow && !maxWidthChanged)
+        if (nativeWindow && nativeWindow.maxSize && !maxWidthChanged)
             return nativeWindow.maxSize.x - chromeWidth();
         else
             return _maxWidth;
@@ -792,7 +792,7 @@ public class WindowedApplication extends Application implements IWindow
      */
     override public function get minHeight():Number
     {
-        if (nativeWindow && !minHeightChanged)
+        if (nativeWindow && nativeWindow.minSize && !minHeightChanged)
             return nativeWindow.minSize.y - chromeHeight();
         else
             return _minHeight;
@@ -840,7 +840,7 @@ public class WindowedApplication extends Application implements IWindow
      */
     override public function get minWidth():Number
     {
-        if (nativeWindow && !minWidthChanged)
+        if (nativeWindow && nativeWindow.minSize && !minWidthChanged)
             return nativeWindow.minSize.x - chromeWidth();
         else
             return _minWidth;


Re: git commit: [flex-sdk] [refs/heads/develop] - This closes #37

Posted by Justin Mclean <ju...@me.com>.
Hi,

> I think we now have belt and suspenders… ;-)

Nice!

Justin

Re: git commit: [flex-sdk] [refs/heads/develop] - This closes #37

Posted by Harbs <ha...@gmail.com>.
I reapplied it with an additional check for closed (which seems to have somehow happened in the original bug report).

I think we now have belt and suspenders… ;-)

On Nov 19, 2015, at 12:32 AM, Justin Mclean <ju...@me.com> wrote:

> Hi,
> 
> Why it may or may not fix the exact issue I can’t see the harm in applying it if it fixes an users issue. The current patch would be less costly than a try/catch.
> 
> Thanks,
> Justin


Re: git commit: [flex-sdk] [refs/heads/develop] - This closes #37

Posted by Justin Mclean <ju...@me.com>.
Hi,

Why it may or may not fix the exact issue I can’t see the harm in applying it if it fixes an users issue. The current patch would be less costly than a try/catch.

Thanks,
Justin

Re: git commit: [flex-sdk] [refs/heads/develop] - This closes #37

Posted by Alex Harui <ah...@adobe.com>.
Actually, the question about testing was more directed at Robbyn666, who
claims it makes a difference empirically, but it could be timing.

Harbs, it is up to you, but IMO you could accept the patch because I don't
think it would make anything worse.

-Alex

On 11/18/15, 1:57 PM, "Harbs" <ha...@gmail.com> wrote:

>No. I did not test it, and I missed that stack trace.
>
>Sorry. My bad. I just reverted the commit.
>
>On Nov 18, 2015, at 11:46 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Did this patch actually get tested to prove it solves the issue?
>> 
>> The exception stack trace starts with:
>> 
>> Error: Error #3200: Cannot perform operation on closed window.
>> at Error$/throwError()
>> at flash.display::NativeWindow/get minSize()
>> 
>> ...
>> 
>> Which makes me think that even the test of checking minSize is going to
>> result in the same exception.  I was expecting the change to test if the
>> window is closed or maybe a try/catch.
>> 
>> -Alex
>> 
>> On 11/18/15, 1:20 PM, "harbs@apache.org" <ha...@apache.org> wrote:
>> 
>>> Repository: flex-sdk
>>> Updated Branches:
>>> refs/heads/develop aee1a2fa0 -> 813fb8eed
>>> 
>>> 
>>> This closes #37
>>> 
>>> 
>>> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>>> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/813fb8ee
>>> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/813fb8ee
>>> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/813fb8ee
>>> 
>>> Branch: refs/heads/develop
>>> Commit: 813fb8eed7fd85fd6a409bb398dbff51bab96124
>>> Parents: aee1a2f
>>> Author: Harbs <ha...@in-tools.com>
>>> Authored: Wed Nov 18 23:19:53 2015 +0200
>>> Committer: Harbs <ha...@in-tools.com>
>>> Committed: Wed Nov 18 23:19:53 2015 +0200
>>> 
>>> ----------------------------------------------------------------------
>>> .../airspark/src/spark/components/WindowedApplication.as     | 8
>>>++++----
>>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>> ----------------------------------------------------------------------
>>> 
>>> 
>>> 
>>>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/813fb8ee/frameworks
>>>/p
>>> rojects/airspark/src/spark/components/WindowedApplication.as
>>> ----------------------------------------------------------------------
>>> diff --git 
>>> 
>>>a/frameworks/projects/airspark/src/spark/components/WindowedApplication.
>>>as
>>> 
>>> 
>>>b/frameworks/projects/airspark/src/spark/components/WindowedApplication.
>>>as
>>> index 8843e5a..6ca3094 100644
>>> --- 
>>> 
>>>a/frameworks/projects/airspark/src/spark/components/WindowedApplication.
>>>as
>>> +++ 
>>> 
>>>b/frameworks/projects/airspark/src/spark/components/WindowedApplication.
>>>as
>>> @@ -690,7 +690,7 @@ public class WindowedApplication extends
>>>Application
>>> implements IWindow
>>>     */
>>>    override public function get maxHeight():Number
>>>    {
>>> -        if (nativeWindow && !maxHeightChanged)
>>> +        if (nativeWindow && nativeWindow.maxSize && !maxHeightChanged)
>>>            return nativeWindow.maxSize.y - chromeHeight();
>>>        else
>>>            return _maxHeight;
>>> @@ -738,7 +738,7 @@ public class WindowedApplication extends
>>>Application
>>> implements IWindow
>>>     */
>>>    override public function get maxWidth():Number
>>>    {
>>> -        if (nativeWindow && !maxWidthChanged)
>>> +        if (nativeWindow && nativeWindow.maxSize && !maxWidthChanged)
>>>            return nativeWindow.maxSize.x - chromeWidth();
>>>        else
>>>            return _maxWidth;
>>> @@ -792,7 +792,7 @@ public class WindowedApplication extends
>>>Application
>>> implements IWindow
>>>     */
>>>    override public function get minHeight():Number
>>>    {
>>> -        if (nativeWindow && !minHeightChanged)
>>> +        if (nativeWindow && nativeWindow.minSize && !minHeightChanged)
>>>            return nativeWindow.minSize.y - chromeHeight();
>>>        else
>>>            return _minHeight;
>>> @@ -840,7 +840,7 @@ public class WindowedApplication extends
>>>Application
>>> implements IWindow
>>>     */
>>>    override public function get minWidth():Number
>>>    {
>>> -        if (nativeWindow && !minWidthChanged)
>>> +        if (nativeWindow && nativeWindow.minSize && !minWidthChanged)
>>>            return nativeWindow.minSize.x - chromeWidth();
>>>        else
>>>            return _minWidth;
>>> 
>> 
>


Re: git commit: [flex-sdk] [refs/heads/develop] - This closes #37

Posted by Harbs <ha...@gmail.com>.
No. I did not test it, and I missed that stack trace.

Sorry. My bad. I just reverted the commit.

On Nov 18, 2015, at 11:46 PM, Alex Harui <ah...@adobe.com> wrote:

> Did this patch actually get tested to prove it solves the issue?
> 
> The exception stack trace starts with:
> 
> Error: Error #3200: Cannot perform operation on closed window.
> at Error$/throwError()
> at flash.display::NativeWindow/get minSize()
> 
> ...
> 
> Which makes me think that even the test of checking minSize is going to
> result in the same exception.  I was expecting the change to test if the
> window is closed or maybe a try/catch.
> 
> -Alex
> 
> On 11/18/15, 1:20 PM, "harbs@apache.org" <ha...@apache.org> wrote:
> 
>> Repository: flex-sdk
>> Updated Branches:
>> refs/heads/develop aee1a2fa0 -> 813fb8eed
>> 
>> 
>> This closes #37
>> 
>> 
>> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/813fb8ee
>> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/813fb8ee
>> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/813fb8ee
>> 
>> Branch: refs/heads/develop
>> Commit: 813fb8eed7fd85fd6a409bb398dbff51bab96124
>> Parents: aee1a2f
>> Author: Harbs <ha...@in-tools.com>
>> Authored: Wed Nov 18 23:19:53 2015 +0200
>> Committer: Harbs <ha...@in-tools.com>
>> Committed: Wed Nov 18 23:19:53 2015 +0200
>> 
>> ----------------------------------------------------------------------
>> .../airspark/src/spark/components/WindowedApplication.as     | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>> ----------------------------------------------------------------------
>> 
>> 
>> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/813fb8ee/frameworks/p
>> rojects/airspark/src/spark/components/WindowedApplication.as
>> ----------------------------------------------------------------------
>> diff --git 
>> a/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
>> 
>> b/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
>> index 8843e5a..6ca3094 100644
>> --- 
>> a/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
>> +++ 
>> b/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
>> @@ -690,7 +690,7 @@ public class WindowedApplication extends Application
>> implements IWindow
>>     */
>>    override public function get maxHeight():Number
>>    {
>> -        if (nativeWindow && !maxHeightChanged)
>> +        if (nativeWindow && nativeWindow.maxSize && !maxHeightChanged)
>>            return nativeWindow.maxSize.y - chromeHeight();
>>        else
>>            return _maxHeight;
>> @@ -738,7 +738,7 @@ public class WindowedApplication extends Application
>> implements IWindow
>>     */
>>    override public function get maxWidth():Number
>>    {
>> -        if (nativeWindow && !maxWidthChanged)
>> +        if (nativeWindow && nativeWindow.maxSize && !maxWidthChanged)
>>            return nativeWindow.maxSize.x - chromeWidth();
>>        else
>>            return _maxWidth;
>> @@ -792,7 +792,7 @@ public class WindowedApplication extends Application
>> implements IWindow
>>     */
>>    override public function get minHeight():Number
>>    {
>> -        if (nativeWindow && !minHeightChanged)
>> +        if (nativeWindow && nativeWindow.minSize && !minHeightChanged)
>>            return nativeWindow.minSize.y - chromeHeight();
>>        else
>>            return _minHeight;
>> @@ -840,7 +840,7 @@ public class WindowedApplication extends Application
>> implements IWindow
>>     */
>>    override public function get minWidth():Number
>>    {
>> -        if (nativeWindow && !minWidthChanged)
>> +        if (nativeWindow && nativeWindow.minSize && !minWidthChanged)
>>            return nativeWindow.minSize.x - chromeWidth();
>>        else
>>            return _minWidth;
>> 
> 


Re: git commit: [flex-sdk] [refs/heads/develop] - This closes #37

Posted by Alex Harui <ah...@adobe.com>.
Did this patch actually get tested to prove it solves the issue?

The exception stack trace starts with:

Error: Error #3200: Cannot perform operation on closed window.
at Error$/throwError()
at flash.display::NativeWindow/get minSize()

...

Which makes me think that even the test of checking minSize is going to
result in the same exception.  I was expecting the change to test if the
window is closed or maybe a try/catch.

-Alex

On 11/18/15, 1:20 PM, "harbs@apache.org" <ha...@apache.org> wrote:

>Repository: flex-sdk
>Updated Branches:
>  refs/heads/develop aee1a2fa0 -> 813fb8eed
>
>
>This closes #37
>
>
>Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/813fb8ee
>Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/813fb8ee
>Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/813fb8ee
>
>Branch: refs/heads/develop
>Commit: 813fb8eed7fd85fd6a409bb398dbff51bab96124
>Parents: aee1a2f
>Author: Harbs <ha...@in-tools.com>
>Authored: Wed Nov 18 23:19:53 2015 +0200
>Committer: Harbs <ha...@in-tools.com>
>Committed: Wed Nov 18 23:19:53 2015 +0200
>
>----------------------------------------------------------------------
> .../airspark/src/spark/components/WindowedApplication.as     | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>----------------------------------------------------------------------
>
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/813fb8ee/frameworks/p
>rojects/airspark/src/spark/components/WindowedApplication.as
>----------------------------------------------------------------------
>diff --git 
>a/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
> 
>b/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
>index 8843e5a..6ca3094 100644
>--- 
>a/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
>+++ 
>b/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
>@@ -690,7 +690,7 @@ public class WindowedApplication extends Application
>implements IWindow
>      */
>     override public function get maxHeight():Number
>     {
>-        if (nativeWindow && !maxHeightChanged)
>+        if (nativeWindow && nativeWindow.maxSize && !maxHeightChanged)
>             return nativeWindow.maxSize.y - chromeHeight();
>         else
>             return _maxHeight;
>@@ -738,7 +738,7 @@ public class WindowedApplication extends Application
>implements IWindow
>      */
>     override public function get maxWidth():Number
>     {
>-        if (nativeWindow && !maxWidthChanged)
>+        if (nativeWindow && nativeWindow.maxSize && !maxWidthChanged)
>             return nativeWindow.maxSize.x - chromeWidth();
>         else
>             return _maxWidth;
>@@ -792,7 +792,7 @@ public class WindowedApplication extends Application
>implements IWindow
>      */
>     override public function get minHeight():Number
>     {
>-        if (nativeWindow && !minHeightChanged)
>+        if (nativeWindow && nativeWindow.minSize && !minHeightChanged)
>             return nativeWindow.minSize.y - chromeHeight();
>         else
>             return _minHeight;
>@@ -840,7 +840,7 @@ public class WindowedApplication extends Application
>implements IWindow
>      */
>     override public function get minWidth():Number
>     {
>-        if (nativeWindow && !minWidthChanged)
>+        if (nativeWindow && nativeWindow.minSize && !minWidthChanged)
>             return nativeWindow.minSize.x - chromeWidth();
>         else
>             return _minWidth;
>


Re: git commit: [flex-sdk] [refs/heads/develop] - This closes #37

Posted by Alex Harui <ah...@adobe.com>.
Did this patch actually get tested to prove it solves the issue?

The exception stack trace starts with:

Error: Error #3200: Cannot perform operation on closed window.
at Error$/throwError()
at flash.display::NativeWindow/get minSize()

...

Which makes me think that even the test of checking minSize is going to
result in the same exception.  I was expecting the change to test if the
window is closed or maybe a try/catch.

-Alex

On 11/18/15, 1:20 PM, "harbs@apache.org" <ha...@apache.org> wrote:

>Repository: flex-sdk
>Updated Branches:
>  refs/heads/develop aee1a2fa0 -> 813fb8eed
>
>
>This closes #37
>
>
>Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/813fb8ee
>Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/813fb8ee
>Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/813fb8ee
>
>Branch: refs/heads/develop
>Commit: 813fb8eed7fd85fd6a409bb398dbff51bab96124
>Parents: aee1a2f
>Author: Harbs <ha...@in-tools.com>
>Authored: Wed Nov 18 23:19:53 2015 +0200
>Committer: Harbs <ha...@in-tools.com>
>Committed: Wed Nov 18 23:19:53 2015 +0200
>
>----------------------------------------------------------------------
> .../airspark/src/spark/components/WindowedApplication.as     | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>----------------------------------------------------------------------
>
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/813fb8ee/frameworks/p
>rojects/airspark/src/spark/components/WindowedApplication.as
>----------------------------------------------------------------------
>diff --git 
>a/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
> 
>b/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
>index 8843e5a..6ca3094 100644
>--- 
>a/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
>+++ 
>b/frameworks/projects/airspark/src/spark/components/WindowedApplication.as
>@@ -690,7 +690,7 @@ public class WindowedApplication extends Application
>implements IWindow
>      */
>     override public function get maxHeight():Number
>     {
>-        if (nativeWindow && !maxHeightChanged)
>+        if (nativeWindow && nativeWindow.maxSize && !maxHeightChanged)
>             return nativeWindow.maxSize.y - chromeHeight();
>         else
>             return _maxHeight;
>@@ -738,7 +738,7 @@ public class WindowedApplication extends Application
>implements IWindow
>      */
>     override public function get maxWidth():Number
>     {
>-        if (nativeWindow && !maxWidthChanged)
>+        if (nativeWindow && nativeWindow.maxSize && !maxWidthChanged)
>             return nativeWindow.maxSize.x - chromeWidth();
>         else
>             return _maxWidth;
>@@ -792,7 +792,7 @@ public class WindowedApplication extends Application
>implements IWindow
>      */
>     override public function get minHeight():Number
>     {
>-        if (nativeWindow && !minHeightChanged)
>+        if (nativeWindow && nativeWindow.minSize && !minHeightChanged)
>             return nativeWindow.minSize.y - chromeHeight();
>         else
>             return _minHeight;
>@@ -840,7 +840,7 @@ public class WindowedApplication extends Application
>implements IWindow
>      */
>     override public function get minWidth():Number
>     {
>-        if (nativeWindow && !minWidthChanged)
>+        if (nativeWindow && nativeWindow.minSize && !minWidthChanged)
>             return nativeWindow.minSize.x - chromeWidth();
>         else
>             return _minWidth;
>