[Gtk-sharp-list] Automatically updating via ListStore.RowChanged event? (beginning C#/Gtk# programming)
Adam Tauno Williams
adam at morrison-ind.com
Mon Feb 4 13:44:29 EST 2008
> I am making a small application using Gtk#/C# where I have a collection
> of data stored in a ListStore.
Are you adding data to the treeview as values (like strings, etc...) or
are you mapping the ListStore directly only your objects? Ultimately I
find doing the later to be simpler as there is nothing to sync.
> What I am trying to get done is that when the ListStore content change
> through user input via the GUI a backend datastore will automatically
> update its data.
I think you want to fire an event from the TreeView (or contained
widget), not from the ListStore; the TreeView needs to notify the
application data has changed. I think ListStore.RowChanged notifies the
widget (or whatever container) that the data has changed in the backend
and the widget needs to be updated. But that is off the top of my head
so I could be wrong.
> My ListStore is presented to the user in a TreeView and I can
> enter/change my data without a problem.
> I cannot get the ListStore.RowChanged event to call my function that
> will send the updated data back to the backend service.
> I have tried limiting my "ListStore Changed" callback to just
> containing a callout of a debug message to my log but nothing show up.
> I have also tried adding a button that manually calls the
> ListStore.EmitRowChanged method but my method is still not responding.
> Anyone with an example of using the ListStore.RowChanged event?
> I suspect that here is some sort of "interference" with the TreeView
> use of the ListStore to keep the treeview updated but I have no clue of
> how to get around that - or even if that is the case.
> Any hints are greatly appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080204/1de54b49/attachment.bin
More information about the Gtk-sharp-list