зеркало из https://github.com/mono/mail-archives.git
96 строки
4.4 KiB
HTML
96 строки
4.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] Databindig IList to a Gtk.TreeView
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Databindig%20IList%20to%20a%20Gtk.TreeView&In-Reply-To=1145793678.5466.24.camel%40localhost.localdomain">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="007119.html">
|
|
<LINK REL="Next" HREF="007115.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Databindig IList to a Gtk.TreeView</H1>
|
|
<B>Michael Hutchinson</B>
|
|
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Databindig%20IList%20to%20a%20Gtk.TreeView&In-Reply-To=1145793678.5466.24.camel%40localhost.localdomain"
|
|
TITLE="[Gtk-sharp-list] Databindig IList to a Gtk.TreeView">m.j.hutchinson at gmail.com
|
|
</A><BR>
|
|
<I>Sun Apr 23 16:12:38 EDT 2006</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="007119.html">[Gtk-sharp-list] Databindig IList to a Gtk.TreeView
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007115.html">[Gtk-sharp-list] Scrollwindow don't works inside Gtk.Fixed
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7121">[ date ]</a>
|
|
<a href="thread.html#7121">[ thread ]</a>
|
|
<a href="subject.html#7121">[ subject ]</a>
|
|
<a href="author.html#7121">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>On 4/23/06, Philip Van Hoof <<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">spam at pvanhoof.be</A>> wrote:
|
|
><i> My implementation basically assumes the IList is a homogeneous list of
|
|
</I>><i> objects that implement that property some way or another. As I cache the
|
|
</I>><i> PropertyInfo instance, I'm not even sure it will work on a non
|
|
</I>><i> homogeneous list where the property is enforced by an interface. But not
|
|
</I>><i> caching the PropertyInfo would mean asking the reflection engine for
|
|
</I>><i> that PropertyInfo on for all items the view will show (this is slower).
|
|
</I>><i>
|
|
</I>><i> ps. I basically need a pi.GetValue (instance, null) and a pi.SetValue
|
|
</I>><i> (instance, value, null) where it would be nice if that "pi" can be
|
|
</I>><i> cached. I'd need to search for the interface type to get the pi from,
|
|
</I>><i> perhaps?
|
|
</I>
|
|
Will it work with a common base class? If so, I guess interfaces will
|
|
work too. I don't know, but I doubt it. According to MSDN, MemberInfo
|
|
classes have a DeclaringType property that is not necessarily the same
|
|
type that the MemberInfo was obtained from. However, you can't use the
|
|
DeclaringType to get a PropertyInfo from the base type, as any
|
|
overridden member is considered to 'redeclare' the member. I poked
|
|
around in Mono's class library as well, but stopped when I hit an
|
|
internal call.
|
|
|
|
If it doesn't work, you could require a System.Type in the ListAdaptor
|
|
constructor, then use that to get a base PropertyInfo. The System.Type
|
|
could then of course be an interface. I think this will work, though I
|
|
could be wrong.
|
|
|
|
><i> I can't spend extremely huge amounts of time on it. Perhaps working on
|
|
</I>><i> all this is a fun task for a summer-of-code google student? It's just an
|
|
</I>><i> idea of course.
|
|
</I>
|
|
GTK# databinding is already on the Mono SoC ideas page:
|
|
<A HREF="http://www.mono-project.com/StudentProjects#DataBinding">http://www.mono-project.com/StudentProjects#DataBinding</A>
|
|
|
|
I'm afraid I'm applying for something else, sorry :(
|
|
It would be interesting to collect ideas for GTK# databinding anyway.
|
|
Maybe we need a wiki page somewhere.
|
|
|
|
|
|
Michael
|
|
</PRE>
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="007119.html">[Gtk-sharp-list] Databindig IList to a Gtk.TreeView
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007115.html">[Gtk-sharp-list] Scrollwindow don't works inside Gtk.Fixed
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7121">[ date ]</a>
|
|
<a href="thread.html#7121">[ thread ]</a>
|
|
<a href="subject.html#7121">[ subject ]</a>
|
|
<a href="author.html#7121">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
|
|
mailing list</a><br>
|
|
</body></html>
|