5 Replies Latest reply on Jul 23, 2010 3:38 AM by Francisc

    List with useVirtualLayout="true" strange problem

    Francisc Level 3


      I have a strange problem. I use a custom itemRenderer in a TileLayout list to display images.

      Each item has a vote button to vote an image.


      The list is not visible at first and very small in height.


      If the currently logged in user has already voted, the button is disabled.


      To do this on the creationComplete handler of the itemRenderer component I run a function that's in the parentApplication:


      var checkVote:Boolean=parentApplication.checkVoteStatus(data.pictureID);


      That method runs a for loop in an array of IDs of images the user has voted (which gets populated once the application gets launched) and returns true if it finds that ID in the voted IDs and false otherwise.


      The strange part is that if I use useVirtualLayout="true" it messes up the buttons from the second line of items. The first line is correct though.


      I added Alert.show in the itemRenderer component to check if the evaluation of IDs is true or false and out of the 6 test images in the List, only 4 of the got there, and those 4 were on the first line. The other 2 were on the second line and they only fire when the list because visible and higher.


      So... what's up?