5 Replies Latest reply on Jul 7, 2011 7:08 PM by JeffryHouser

    IconItemRenderer does not override getCurrentRendererState()

    Yozef0 Level 1

      I have an ItemRenderer that I've been using for a web app's List, now I need to convert that app into a Mobile App.  I am trying to use the optimized IconItemRenderer to display that same item.  My Previous Code has:


      override public function set data(value:Object):void {
           super.data = value;
           value_ti.text = value.ProdValue;
      override protected function commitProperties():void  {
           setCurrentState(getCurrentRendererState(), (mx_internal::playTransitions as Boolean));
      override protected function getCurrentRendererState():String {
           var state:String = super.getCurrentRendererState();
           if (state == 'normal') {
                if (data.date_purchased != null) {
                state = 'sold';
                } else {
                state = 'normal';
                } else if (state == 'sold') {
                this.mouseEnabled = false;
                this.mouseChildren = false;
           return state;


      With the code above, I figured I would simply change the ItemRenderer to an IconItemRenderer, and would solve the problem... though... Flash Builder gave me the Error: 1020: Method marked override must override another method. Refering to the method: getCurrentRendererState();


      I figure getCurrentRendererState() does not exist in the IconItemRenderer...


      Is it possible to achieve the code above through the IconItemRenderer?