This project is read-only.

Table_Clearing and Observation Pausing

Jan 10, 2010 at 2:31 PM


I was wondering why you didn't include handling the TableClearing event for a datatable collection notification. You do handle the TableCleared event though (obviously). The reason I ask is because, although I can see an argument stating "why care if it's clearing, wait till its cleared", there may be a need to alert users that a clearing is taking place but not yet complete. As I think the timespan between Clearing and Cleared events is undetermined (based upon the size of the tables, etc.), by having this notification (but not incrementing the version number), the user could know that something is taking place, thus not allowing additional tasks to take place (if required) until the Cleared event is fired.

With that being said, have you ever considered allowing the "pausing" of observability? What I mean by this is, in enterprise applications with some clients, it's not uncommon for the end user to want to be the one to actually hit the "Refresh" button on their screen to refresh the data. Perhaps they want to continue looking at data that is displayed on the screen for analysis purposes and do not want it dynamically changing on them. While some could argue that you just would not use Obtics for this instance, I would say that you very well could, but you may want to temporarily disable the observability by having a flag that tells Obtics to disregard propogating any changes or updates, wait until the flag is cleared.

As an example, the user could have a checkbox on the screen that says "Dynamically Update Data". Observability is enabled/disabled relative to that.

Just some thoughts. Hope it helps.

Kind Regards,


Jan 11, 2010 at 10:51 PM

Hi Matt,

Beware that the Obtics to DataSet library is nowhere finished. Started on it some time ago but never got round finishing it. Currently I'm busy with a redo of the transformation elements. You can use the parts of the DataSet adaptation that work. Would even be better if you could develop it further and make it more finished :-)

I don't think there can be a switch to stop the whole of obtics to pause processing changes. There could be transformation elements that pause processing and in fact there already are. The ValueProvider.Async and ObservableEnumerable.Async methods can take a custom IWorkQueue object. All you need to do is implement an IWorkQueue object that processes events when you want it to. Then use Async, with your IWorkQueue as its parameter, as the last element of your transformations.