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] [Commented] (FLEX-34084) Error with PopupButton/Menu in headerrenderer in DataGrid
Date Thu, 13 Feb 2014 22:52:20 GMT

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

Justin Mclean commented on FLEX-34084:
--------------------------------------

However the fix to stop the RTE in Menu.as is straight forward - any change you can provide
a skeleton application with a DG that uses the supplied item renderer?

> Error with PopupButton/Menu in headerrenderer in DataGrid
> ---------------------------------------------------------
>
>                 Key: FLEX-34084
>                 URL: https://issues.apache.org/jira/browse/FLEX-34084
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: DataGrid, mx: Menu, mx: PopUpButton
>    Affects Versions: Apache Flex 4.11.0
>         Environment: Web Browser
>            Reporter: Mike Crank
>            Assignee: Justin Mclean
>             Fix For: Apache Flex 4.11.0
>
>
> TypeError: Error #1009: Cannot access a property or method of a null object reference.
> 	at mx.controls::Menu/updateDisplayList()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/mx/src/mx/controls/Menu.as:1401]
> 	at mx.controls.listClasses::ListBase/validateDisplayList()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as:3968]
> 	at mx.managers::LayoutManager/validateClient()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1041]
> 	at mx.core::UIComponent/validateNow()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/framework/src/mx/core/UIComponent.as:8340]
> 	at mx.controls::PopUpMenuButton/commitProperties()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/mx/src/mx/controls/PopUpMenuButton.as:682]
> 	at mx.core::UIComponent/validateProperties()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/framework/src/mx/core/UIComponent.as:8482]
> 	at mx.managers::LayoutManager/validateClient()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:965]
> 	at mx.controls::DataGrid/http://www.adobe.com/2006/flex/mx/internal::calculateHeaderHeight()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/mx/src/mx/controls/DataGrid.as:2225]
> 	at mx.controls.dataGridClasses::DataGridHeader/measure()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridHeader.as:209]
> 	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/framework/src/mx/core/UIComponent.as:8769]
> Here is the code of the headerrenderer. Works fine in Flex 4.6 SDK
> <?xml version="1.0" encoding="utf-8"?>
> <mx:HBox xmlns:fx="http://ns.adobe.com/mxml/2009" 
> 		 xmlns:s="library://ns.adobe.com/flex/spark" 
> 		 xmlns:mx="library://ns.adobe.com/flex/mx"
> 		 xmlns:flash.filters="flash.filters.*"
> 		 horizontalAlign="left" verticalAlign="middle"
> 		 width="100%" height="100%" paddingLeft="4"
> 		 horizontalScrollPolicy="off">
> 	
> 	<fx:Declarations>
> 		<mx:ArrayCollection id="ynAC">
> 			<fx:Object label="All" enabled="true" type="check" toggled="true" data="2"/>
> 			<fx:Object label="No" enabled="true" type="check" toggled="true" data="0"/>
> 			<fx:Object label="Yes" enabled="true" type="check" toggled="true" data="1"/>
> 		</mx:ArrayCollection>
> 		
> 		<fx:Array id="filterAR">
> 			<flash.filters:DropShadowFilter id="dropShadowFilter" alpha="0.9" angle="45" blurX="5"
blurY="5" distance="4" color="0xababab"/>
> 		</fx:Array>	   		
> 	</fx:Declarations>
> 	
> 	<fx:Script>
> 		<![CDATA[
> 			import mx.controls.Menu;
> 			import mx.events.MenuEvent;
> 			[Embed(source='assets/images/filter.png')]
> 			private var filterIcon:Class;	
> 			
> 			private function setMenuBTN():void {
> 				for (var i:int = 0; i < ynAC.length; i++) {
> 					filterBTN.dataDescriptor.setToggled(ynAC.getItemAt(i), i == 0);
> 				}
> 			}
> 			
> 			private function initSortMenu():void {
> 				Menu(filterBTN.popUp).filters = filterAR;
> 			}
> 			
> 			private function userItemSelected(event:MenuEvent):void {		
> 				for (var i:int = 0; i < ynAC.length; i++) {
> 					event.menu.dataDescriptor.setToggled(ynAC.getItemAt(i), i == event.index);
> 				}
> 				
> 				parentDocument.setPublishedObject(ynAC.getItemAt(event.index).data);
> 			}
> 		]]>
> 	</fx:Script>
> 	
> 	<mx:PopUpMenuButton id="filterBTN" dataProvider="{ynAC}" icon="{filterIcon}" creationComplete="setMenuBTN();
initSortMenu()" itemClick="userItemSelected(event)" openAlways="true" labelField="label" width="40"
height="26"/>
> 	<s:Label text="Published"/>
> 	
> </mx:HBox>



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message