2 Replies Latest reply on Mar 24, 2011 10:45 AM by Flex harUI

    SDK 3.4 - Tree and List rollover update flicker

    -skitch- Level 1

      I have a rollover issue with items in a tree or list.  When the item is rolled over in a tree or list, an update to that item is made from our server.  It seems that the update causes the rollover indication to disappear.  It's like the item is being redrawn.  Is there a way to disable the item invalidation?  Is this a bug with my sdk?

       

      I also have a button on the item renderer that disappears too.  It is added and removed in commit properties, since it extends TreeItemRenderer and it's displayed over the icon.  Since the icon is added and removed in commitProperties, the button has to be added and removed in commitProperties to keep it's child index above the icon.

        • 1. Re: SDK 3.4 - Tree and List rollover update flicker
          -skitch- Level 1

          Here is some code.  Notice when you rollover, the highlight goes away.

           

          Test.mxml:

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600"
                               height="100%" width="100%">
               <mx:List
                    dataProvider="{dp}"
                    itemRollOver="onRollover()"
                    labelField="label"
                    height="100%"
                    width="100%"/>
              
               <mx:Script>
                    <![CDATA[
                         import mx.collections.ArrayCollection;
                         [Bindable]
                         public var dp:ArrayCollection = new ArrayCollection([new Asset(), new Asset()]);
                        
                        
                         protected function onRollover():void {
                                   for each(var item:Object in dp)
                                   {
                                        if(item is Asset)
                                        {
                                             Asset(item).name += "test";
                                        }
                                   }
                         }
                    ]]>
               </mx:Script>
          </mx:Application>

           

           

          And Asset.as:

           

          package
          {
               [Bindable]
               public class Asset
               {
                    public function Asset()
                    {
                    }
                   
                    public var name:String = "test";
                   
                    public var label:String = "test";
               }
          }
          • 2. Re: SDK 3.4 - Tree and List rollover update flicker
            Flex harUI Adobe Employee

            Updates to items will force a redraw.  Maybe use disableAutoUpdates