Select to view content in your preferred language

TabNavigator in infowindow

710
3
08-25-2010 11:42 PM
Alexandervan_der_Schans
New Contributor
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
Tags (2)
0 Kudos
3 Replies
MLowry
by
Occasional Contributor II
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


If you post your InfoContentItemRenderer.mxml; we could take a look at it for you.
0 Kudos
Alexandervan_der_Schans
New Contributor
Thanks Mike!
It's after working hours here now,so unfortunately I can't acces my files right now. I'll get at it first thing in the morning though, so I would really appreciate it if you could take a look at it then 🙂

Thanks alot!
0 Kudos
Alexandervan_der_Schans
New Contributor
Hi Mike,
This is my InfoContentItemRenderer.mxml:



<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>
0 Kudos