flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLEX-33600) Creating a pop up from a menubar or from within Firefox crashes
Date Tue, 02 Jul 2013 22:36:22 GMT

    [ https://issues.apache.org/jira/browse/FLEX-33600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13698332#comment-13698332
] 

Justin Mclean edited comment on FLEX-33600 at 7/2/13 10:35 PM:
---------------------------------------------------------------

Any chance you can provide an example that shows this?

What version of AIR were you using? Also do you know if this is an issue under Apache Flex
4.9? There has been a few fixes to the popup manager.

I tried a simple example with a menu and a dummy popup and no error occurs either on 4.6 or
4.9.

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
					   xmlns:s="library://ns.adobe.com/flex/spark" 
					   xmlns:mx="library://ns.adobe.com/flex/mx">
	<fx:Script>
		<![CDATA[
			import mx.containers.TitleWindow;
			import mx.events.MenuEvent;
			import mx.managers.PopUpManager;

			protected function menuChanged(event:MenuEvent):void
			{
				var label:String = event.item.@label;
				
				// clicking on a submenu brings up a dummy TitleWindow
				if (label.search("-") >= 0) {
					PopUpManager.addPopUp(new TitleWindow(), this);
				}
			}
			
		]]>
	</fx:Script>
	
	<mx:MenuBar id="myMenuBar" labelField="@label" change="menuChanged(event)">
		<fx:XMLList>
			<menuitem label="MenuItem A">
				<menuitem label="SubMenuItem A-1" />
				<menuitem label="SubMenuItem A-2" />
			</menuitem>
			<menuitem label="MenuItem B" />
			<menuitem label="MenuItem C" />
			<menuitem label="MenuItem D">
				<menuitem label="SubMenuItem D-1" />
				<menuitem label="SubMenuItem D-2" />
				<menuitem label="SubMenuItem D-3" />
			</menuitem>
		</fx:XMLList>
	</mx:MenuBar>
	
</s:WindowedApplication>

I can see that the code could RTE but to fix need to check what happens if we put a guard
in.

                
      was (Author: jmclean):
    Any change you can provide an example that shows this?

What version of AIR were you using? Also do you know if this is an issue under Apache Flex
4.9? There has been a few fixes to the popup manager.

I tried a simple example with a menu and a dummy popup and no error occurs either on 4.6 or
4.9.

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
					   xmlns:s="library://ns.adobe.com/flex/spark" 
					   xmlns:mx="library://ns.adobe.com/flex/mx">
	<fx:Script>
		<![CDATA[
			import mx.containers.TitleWindow;
			import mx.events.MenuEvent;
			import mx.managers.PopUpManager;

			protected function menuChanged(event:MenuEvent):void
			{
				var label:String = event.item.@label;
				
				// clicking on a submenu brings up a dummy TitleWindow
				if (label.search("-") >= 0) {
					PopUpManager.addPopUp(new TitleWindow(), this);
				}
			}
			
		]]>
	</fx:Script>
	
	<mx:MenuBar id="myMenuBar" labelField="@label" change="menuChanged(event)">
		<fx:XMLList>
			<menuitem label="MenuItem A">
				<menuitem label="SubMenuItem A-1" />
				<menuitem label="SubMenuItem A-2" />
			</menuitem>
			<menuitem label="MenuItem B" />
			<menuitem label="MenuItem C" />
			<menuitem label="MenuItem D">
				<menuitem label="SubMenuItem D-1" />
				<menuitem label="SubMenuItem D-2" />
				<menuitem label="SubMenuItem D-3" />
			</menuitem>
		</fx:XMLList>
	</mx:MenuBar>
	
</s:WindowedApplication>

I can see that the code could RTE but to fix need to check what happens if we put a guard
in.

                  
> Creating a pop up from a menubar or from within Firefox crashes
> ---------------------------------------------------------------
>
>                 Key: FLEX-33600
>                 URL: https://issues.apache.org/jira/browse/FLEX-33600
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: PopUp Manager
>    Affects Versions: Adobe Flex SDK 4.6 (Release)
>         Environment: Adobe Air Windows - Flash program within Firefox
>            Reporter: Peter Wharmby
>            Priority: Critical
>              Labels: easyfix
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In PopUpManagerImpl line 460 we have 
> 		if (!localRoot)
> 			localRoot = DisplayObjectContainer(parent.root);
> This crashes if parent is null.
> Happens when trying to open a pop up when a menu is still closing in Air (sometimes)
or when called from firefox browser (always)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message