Todd Berman <[EMAIL PROTECTED]> wrote:

Oh, thats the best part of writing a managed TreeModel implementation.
gtk+ would ask your TreeModel for the data, so you wouldn't have to do
much else to get it to work. In fact, Vlad has written a DataTableModel
that is all managed code that works using DataSet not ITypedList, if you
look at the archives to this list, I am sure you can find it.

Yes, I'm familiar with that code (assuming you mean the one that works with DataTable). It basically keeps references to the data, translating iters to rows. (Native to managed call for each column's value is still required). Come to think of it though, this implementation is a bit better than my suggestion for a referencing ListStore - getting the value from the model is nicer than using CellDataFunc. Sadly, I don't recall right now if there was a reason that I chose otherwise...

Also, I prefer to rely on the interfaces (ITypedList, IBindingList) and not specifically on classes such as DataTable or DataSet because it allows the data binding to be used with other types of data sources, including custom ones. That's also the reason I think the data binding should not rely on the DataSet class, but on the aforementioned interfaces - and expose another sugary interface above it for usage with DataSet if that is required.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to