Too many TextFields and not enough beer makes FP9 crash

January 21, 2008 on 2:54 pm | In Flex, Programming | 1 Comment

I’m working on an interesting and involved project (that I can’t say very much about right now), and it uses a ton of dynamic TextField objects on the screen. I thought things were going superbly, but my app started to crash the player at odd times as the display became more complex. I wanted to tear my hair out, but said hair is kind of short-to-nonexistent and it was hard to get a good enough grip. I tried to reproduce the crash, but each time I thought I knew what was causing it and made the “fix”, it would come back.

It was right around then that I recalled David Coletta of the Buzzword team mentioning at Flex Camp Boston that the Buzzword application uses a bunch of clever techniques to avoid creating and destroying TextFields as the user types (since they use lots of them to render what appears to be a unified display of a rich-text document). Among other things, he mentioned that they pool TextField instances offscreen — while keeping them on the display list — and reuse them by bringing them back onscreen to show stuff as needed. [Continued…]

1 Comment

Entries and comments feeds. Valid XHTML and CSS.
All content copyright (c) 2006-2007 Joseph Berkovitz. All Rights Reserved.