3 Replies Latest reply on Nov 21, 2010 10:54 AM by drkstr_1

    creating a thumbnail itemrenderer for a FileSystemTree -what life cycle functions should i override?

    saariko Level 1

      hey all


      i have build an air app that has an extension of a FileSystemTree Component in it, to display only the jpg files and directories in the file system.

      a checkbox allows the user to choose whether to see the items in the tree as thumbnails or regular (labels+icons) tree items (the tree has variableRowHeight set to true).


      if the checkbox is selected, any time a branch in the tree is opened all the thumbnails of the jpeg files in that directory are rendered first.

      this part of the application works fine (the thumbs are created).


      my custom itemrenderer is an extension of the TreeItemRenderer class.


      the display of the items in the tree is unpredictable and scrolling the tree makes it worth. i am pretty sure that i didn't override the "lifecycle" functions of the component (the invalidation and validation methods) correctly.


      i have added a function called thumbToggle which informs the itemrenderer if the checkbox is selected or deselected while the tree is idle.


      what is your opinion in overriding set data, invalidateProperties, invalidateSize, invalidateDisplayList, commitProperties, measure, updateDisplayList and other functions to achieve a smooth operation of such a tree?


      thanx in advance,