[Gtk-sharp-list] Ways of supporting complex data binding in
redhatdude at gmail.com
Tue Jul 19 15:30:53 EDT 2005
On 7/19/05, Ales Vojacek <alesv at fbl.cz> wrote:
> Is something new about TreeView databinding? If so, where can I find
> more about it?
> Thank you Ales
I have taken Vladimir's ManagedTreeModel and reworked it to work with more
modern gtk-sharp. Then I wrote an implementation which uses a DataTable as
its source (I didn't know about DataTableModel at the time). So far I've
gotten filtering, sorting, etc working, but things are acting a bit flaky
right now. For some unknown reason when I have more than a certain number of
records in my model (the limit varies on each compilation) my app crashes
when I try to drop down a menu from my menu bar. I'm trying to track down
the bug, but it's been eluding me for a couple of days.
(If anyone's interested, when I use gdb to debug mono, it crashes on
gtk_accel_group_find(), but my X also seems to lock up and I have to
I've also had problems with the fact that the _user_data fields in
Gtk.TreeIter are internal, so I've had to alter my copy of gtk-sharp to make
them public so I can test the model (though you could probably use
StructToPtr to get around this by copying the TreeIter structure to your own
structure, editing the data, and then copying it back).
If anybody is interested, ask and I'll mail you a copy.
Todd Berman wrote:
> >On Sat, 2005-05-28 at 05:07 -0700, Chas wrote:
> >>The question of which data-binding way to go is still
> >>viable however, whether the TreeModel itself would be
> >>100% managed or not. If you have any additional input
> >>on that, I'd be happy to hear. (As you said, both ways
> >>are suboptimal, so I'm afraid maybe both ways would
> >>have to supported to allow for different scenarios
> >>with different requirements.)
> >>Anyway, thanks for your response - I'll reconsider;
> >>indeed, maybe waiting with this till it's possible to
> >>do it in 100% managed code would be a smarter move.
> >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.
> >Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
(RedHatDude at gmail.com)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list