« Icons in ComboBox | Main | The Future of List Classes (Tree, TileList, DataGrid, etc) »

Disabling List Selection

Recently a couple of FlexCoders asked about how to prevent certain entries from being selected in a List or Tree or ComboBox. I cobbled this together. Usual caveats apply. Hopefully it will help.

Run Demo
Download Source

Comments

Hi Alex,

This is just a general question, not on lists.

But does flex have any way to read files syncronously?

You see, I am developing an app that really needs to read a lot of small files, in order. Having to spawn off a new event for each and every file totally will make my code into a mess.

The files will be read locally. I just want to read my files syncronously.

Is this possible within flex? I tried making a busy loop that checked for a flag set by the loaded event, but it seemed like the loop froze the event! Catch-22!

I don't suppose you know of some clever little insider trick that could be used to allow events to fire from within busy loops, so that I can freeze my code's execution until the file is loaded? Just like how reading files is supposed to work, normally. Except without the excessive CPU usage that such a loop creates :(

--------------

There is no synchronous file I/o in the flash player. Note also that in general, a server-based app cannot access local files on the client computer. If you use Apollo/AIR, you should get much better file i/o performance, but web-based stuff will still be asynch.

Generally, you do not loop waiting for file i/o to finish. Listen for the COMPLETE event instead.

Thanks alex for the interesting informations. The Download Link is very usefully and works excellent. Thanks for share it! Werbeagentur

Thanks Alex for the Demo and Download link... Very usefully and helps very great ;)

Thanks

@ http://www.medienstern.de/werbeagentur/

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)