0 Replies Latest reply on Oct 8, 2008 2:59 PM by rawky1976

    State to look like another, but not based on it?

      Hello all, I've a strange request about view states

      I have a state that initialises a datagrid on load and that works just fine (it shows open issues)
      Above there is a link button to show closed issues, I tried a new state based on open issues but the code didn't look right, so I created a new state based on the base and then copied all the code to remove and add children.

      All that need to happen is that the datagrid in this state needs to display one extra column (and different data!)

      But I get this error: -

      Severity and Description Path Resource Location Creation Time Id
      In initializer for 'states': type mx.states.RemoveChild is not assignable to target Array element type . <projectname>/src <projectname>.mxml line 257 1223502361318 179

      The line itself is the middle of these three: -

      <mx:State name="issues_board_closed"/>
      <mx:RemoveChild target="{regUsersLabel}"/>
      <mx:SetProperty target="{currentIssues}" name="y" value="85"/>

      Anyone ever copied viewstate code to another before, had any issues?

      Thank you, Mark