0

Here is what I'm trying to do:

I'm doing an app that displays a list of events, when I create the event, the event is a core.async channels, what I want to do is, given the channel was first added it should read and them render that state (what's ok to do), but later, this channel must still listen for new values, when those values come, it must update the current rendered value.

Stepping back to make it more clear, in a more casual situations you would simple get the index of current element and update it's data, but since my update events can happen long after they are first created, changes are it's index got changed (because some of the other elements may be removed along this time).

The only solution that I see here is to create some random ID for the channel when it's first added, and on updates I do a lookup for it's ID and update that, but I think solution is far for ideal, because on that way I need to do a full scan on the events list for any update...

There is a better way that I'm missing to do this thing?

Wilker Lucio
  • 2,619
  • 2
  • 20
  • 11
  • example code if possible please - not sure i'm getting the problem – pete23 May 11 '14 at 10:05
  • Can you provide an some example events (and ideally a sample stream of events and explain what the output you expect after each event)? –  May 21 '14 at 22:32
  • I did solved by generating random indexes for each item, so I could keep track of them and update them from an outside source. but thanks guys – Wilker Lucio May 24 '14 at 04:47

0 Answers0