Skip to main content
Participant
June 11, 2011
Question

ItemRender view states

  • June 11, 2011
  • 2 replies
  • 744 views

Hello, I think I found an issue.
Have any of you heard of a problem with ItemRender's view states.
Primarily a itemrender custom view state.

If you set the current state to a custom state, then
move the mouse over the IR, the hover property sets, and then
the state shifts to the first defined view state(assuming that
the state you set is different)

I have an example project that illustrates.

This topic has been closed for replies.

2 replies

JDurham25Author
Participant
June 11, 2011

Wait a moment.

This was a problem in the SDK version 4.1 and earlier.

I installed 4.5 and found this in the IR source:

protected function getCurrentRendererState():String
    {
        // this code is pretty confusing without multi-dimensional states, but it's
        // defined in order of precedence.
       
        if (dragging && hasState("dragging"))


  ...... Omited Code ......


        if (hasState("normal"))   
            return "normal";
       
        // If none of the above states are defined in the item renderer,
        // we return currentState, so we don't change the state just
        // in case the developer put the item renderer into its
        // own custom state.
        return currentState;
    }

This is very different from the original which returned null.

Adobe Employee
June 11, 2011

If you add custom states, you have to override logic that sets the states.

In 4.5, we added a getCurrentSkinState() method

JDurham25Author
Participant
June 11, 2011

Do you mean getCurrentRendererState() function?

There is no getCurrentSkinState() on an ItemRender.

This function does the same basic thing, though, right?