Piotr - the problem is with turning off the blinking after some period,
because at that later time, the renderer may be showing data belonging to a
DIFFERENT cell.

e.g. if you scroll the datagrid, the renderer will be recycled and will now
be attached to a completely different cell. 

Alternatively, if you are suggesting using 2 data items for each cell, one
to show the data, and the other to control the background, and then setting
a timer to change the second data item when it's time to change the
background, the that could work I suppose.

ie.: a data item bound to the text and another bound to the background.

Of course doubles the amount of databinding, but on the other hand, if you
could have just one timer and mulitplex it to control of the blinking. eg,
by decrementing a counter for each item which is blinked on, and when that
counter gets to zero, setting it back to normal via databinding.

I might try that next, ie: blinking entirely on the data side, not the view
side, and see if it improves performance.

I did read somewhere that setting styles is more expensive than changing
visibility, so this could be further extended to have a canvas with 2 labels
per cell, one with a highlighted background and the other with a normal
background, and then switching them, again, binding to a second data element
(which shows which cell to show).

All of this does seem like a lot of work for a feature that seems pretty
standard - namely: the ability to temporarily change the contents of a cell
when there is new data.





--
View this message in context: 
http://apache-flex-users.2333346.n4.nabble.com/Best-way-to-blink-a-Spark-Datagrid-cell-tp9334p9350.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to