Hi everybody,I'm using the SFV 2.0 and am trying to get the InfoPopupWidget to show a Tabnavigator. I'm currently trying to modify the InfoContentItemRenderer.mxml, but when I add the navigator bar and navigator content, I get a #1009 error Cannot access a property or method of a null object reference whenever I click on a feature to open the InfoPopupWidget. When I dismiss all these errors, the tab works fine though! So no I'm wondering what's causing the error. Is the InfoContentItemRenderer.mxml the right way to modify the InfoPopupWidget?thanks!Alex
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" autoDrawBackground="false" dataChange="itemrenderer_dataChangeHandler(event)" minHeight="30"> <fx:Script> <![CDATA[ import mx.events.FlexEvent; private function itemrenderer_dataChangeHandler(event:FlexEvent):void { field.text = data.field + ":"; value.text = data.value; } ]]> </fx:Script> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; .headerstyle { fontFamily:tahoma; fontSize:12; font-weight:bold } </fx:Style> <!--s:layout> <s:VerticalLayout horizontalAlign="center"/> </s:layout--> <mx:TabNavigator backgroundAlpha="0" id="tabs" borderStyle="none" resizeToContent="true"> <s:NavigatorContent> <s:HGroup> <s:Label fontFamily="Arno Pro" fontSize="20" fontWeight="normal" id="field"/> <s:Label fontFamily="Arno Pro" fontSize="20" fontWeight="normal" id="value" width="100%"/> </s:HGroup> </s:NavigatorContent> <s:NavigatorContent> <s:VGroup> <mx:DataGrid width="400" height="200"> <mx:columns> <mx:DataGridColumn headerStyleName='.headerstyle' headerText="Variabele"/> <mx:DataGridColumn headerText="Prestatie"/> <mx:DataGridColumn headerText="Benchmark"/> </mx:columns> </mx:DataGrid> </s:VGroup> </s:NavigatorContent> <s:NavigatorContent> <mx:Image scaleY="0.9" source="http://www.visifire.com/blog/wp-content/post_images/CreatingVisifireChartsWithManagedCode_C35C/Chart.jpg"/> </s:NavigatorContent> </mx:TabNavigator> </s:ItemRenderer>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.