Skip navigation
BlackJack1983
Currently Being Moderated

ViewNavigator Skin

Aug 9, 2012 3:28 AM

Hi all,

 

i would like to skin my ViewNavigator(s), part of a TabbedViewNavigatorApplication.

 

my parts code are:

- Application:

 

<s:ViewNavigator skinClass="skins.TabNavSkin" id="homePage" label="Home" width="100%" height="100%" firstView="views.StockMarketView" icon="@Embed('assets/homepage_tab_icon.png')"/>

 

- My skin file is:

 

<?xml version="1.0" encoding="utf-8"?>

<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"

        xmlns:s="library://ns.adobe.com/flex/spark" >

    <!-- host component -->

    <fx:Metadata>

        [HostComponent("spark.components.ViewNavigatorApplication")]

    </fx:Metadata>

   

    <fx:Script>

        <![CDATA[

           

           

        ]]>

    </fx:Script>

   

    <s:states>

        <s:State name="normal" />

        <s:State name="portraitAndOverlay" />

        <s:State name="landscapeAndOverlay" />

        <s:State name="portrait" />

        <s:State name="disabled" />

        <s:State name="landscape" />

    </s:states>

   

    <s:Rect>

        <s:fill>

            <s:LinearGradient rotation="90">

                <s:GradientEntry color="#ff0000" />

                <s:GradientEntry color="0x4f83aa" />

            </s:LinearGradient>

        </s:fill>

    </s:Rect>

   

   

   

</s:Skin>

 

 

But when i run have this error:

 

 

TypeError: Error #1009: Cannot access a property or method of a null object reference.

    at spark.transitions::ViewTransitionBase/captureEndValues()[E:\dev\4.y\f rameworks\projects\mobilecomponents\src\spark\transitions\ViewTransiti onBase.as:747]

    at spark.components::ViewNavigator/completeTransitionPreparations()[E:\d ev\4.y\frameworks\projects\mobilecomponents\src\spark\components\ViewN avigator.as:2243]

    at spark.components::ViewNavigator/prepareViewTransition()[E:\dev\4.y\fr ameworks\projects\mobilecomponents\src\spark\components\ViewNavigator. as:2172]

    at flash.events::EventDispatcher/dispatchEventFunction()

    at flash.events::EventDispatcher/dispatchEvent()

    at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\f ramework\src\mx\core\UIComponent.as:13152]

    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\framewo rks\projects\framework\src\mx\managers\LayoutManager.as:844]

    at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y \frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]

 

 

Something about this...?

 

Thanks a lot.

 

BJ

 
Replies
  • Currently Being Moderated
    Aug 10, 2012 9:52 AM   in reply to BlackJack1983

    Got the same problem today.

    I've fix it by removing the actionBarVisible="false" in all my Views.

     

    Hope it will work for you too.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points