Repeater width? Really?

So, I came across a weird bug in a project that I’m working on where I’m getting a flicker when transitioning between children within a view stack.  On each child in the stack I’ve specified a hide and show effect so that when I switch from one to the other, the existing view slides out and the new one slides in.  I have this functioning perfectly fine on 4 other sections of this site, but on one particular section where the views are dynamically created from an XML file, I’m getting this flicker.  The existing view slides out, then I see the new view for just a split-second already in its end position, and then I see it slide in.  I was able to identify that this was what was happening until i set the duration on each transition to something like 1000ms so that everything was slowed down.  The flicker only occurred when a view was loaded for the first time. I tried a couple of things like changing the value of suspendBackgroundProcessing from true to false, and changing the creation policy of the view stack.  Nothing seemed to make any difference.  Then, for whatever reason, I decided to try setting the width of the repeater that’s dynamically adding the views to the view stack and it fixed it.  I don’t get it, but whatever, it worked.  It makes no sense why a Repeater component even has a width and height property, or why setting it would fix this quirky glitch.  My only guess is that somewhere in the measurement routine is getting hung up when it encounters a parent component that doesn’t have a width and it’s spitting out a NaN which equates to 0. Shrug.

This entry was posted in Flex. Bookmark the permalink. Both comments and trackbacks are currently closed.