appcelerator/titanium_mobile — pull request #2493 by farfromrefug (2012-07-01 14:00:05+00:00)
Title: tableview new events / TiBlob toImage() / FastDev correction

Hi,
This is my first pull request so i might have a lot of things to correct :s

1- FastDev correction: FastDev doesnt work on OSX leopard because python is 2.6

2- I needed to get the "image" width and height of a blob. I didnt want the hassle of creating an ImageView and doing toBlob, so i added a toImage method on TiBlob (just like to string).

3- I added "reuse" and "rowappear" events in the tableview. This allows huge improvements in tableview loading and scrolling. For exemple if you download async images, you can start the download only when the row appears and stop it on reuse. Also you can "create" the row content only on "rowappear".
When you have a lot of complex rows it can drastically improve table loading. So the idea is that you create the rowData only with empty rows. Then on "rowappear" you create your custom view and add it to the row.
It works amazingly well. I still have to figure out why on android when loading the tableview, displayed cells first appear empty then fill themselves.
I add to fire the "reuse" event on the row itself, because of the ios implementation.
The "rowappear" event is fired on the tableview

I am willing to improve anything necessary to make this go through. But i think it can help people a lot! especially with tableviews.

Thanks