0 Replies Latest reply on Sep 5, 2008 2:44 PM by Newsgroup_User

    Custom state not visible in Design view - need a solution!

    Level 7
      I have tried to extend State (mx.states.State).When I open the Design view,
      no components in State is shown and I get
      an error:
      com.adobe.flexbuilder.mxmlmodel.NonVisualComponentInstance
      MyStete class:package org.test
      {
      import mx.states.State;

      public class MyState extends State
      {

      public function myFunction():void{
      trace("test");
      }
      }
      }

      Then, I tried to use custom state in application:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml";
      xmlns:t="org.test.*" layout="absolute">
      <mx:states>
      <mx:State id="one" name="start">
      <mx:AddChild>
      <mx:Button label="Hi There!" x="144.5"
      y="97">
      </mx:Button>
      </mx:AddChild>
      </mx:State>
      <t:MyState id="two" name="my">
      <mx:AddChild>
      <mx:Button label="Me too!" x="144.5"
      y="97">
      </mx:Button>
      </mx:AddChild>
      </t:MyState>
      </mx:states>
      <mx:Button x="74" y="78" label="Button"/>
      </mx:Application>

      However in Design view states are no more displayed.


      This is a serious bug in Flex builder. Any workarounds for this?