mail-archives/monodroid/2011-December/007755.html

97 строки
3.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [mono-android] System.NotSupportedException with ArrayAdapter of custom object
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20System.NotSupportedException%20with%20ArrayAdapter%0A%09of%20custom%20object&In-Reply-To=1323671919481-5067350.post%40n5.nabble.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="007740.html">
<LINK REL="Next" HREF="007765.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[mono-android] System.NotSupportedException with ArrayAdapter of custom object</H1>
<B>Jonathan Pryor</B>
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20System.NotSupportedException%20with%20ArrayAdapter%0A%09of%20custom%20object&In-Reply-To=1323671919481-5067350.post%40n5.nabble.com"
TITLE="[mono-android] System.NotSupportedException with ArrayAdapter of custom object">jonp at xamarin.com
</A><BR>
<I>Mon Dec 12 16:42:34 EST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="007740.html">[mono-android] System.NotSupportedException with ArrayAdapter of custom object
</A></li>
<LI>Next message: <A HREF="007765.html">[mono-android] System.NotSupportedException with ArrayAdapter of custom object
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7755">[ date ]</a>
<a href="thread.html#7755">[ thread ]</a>
<a href="subject.html#7755">[ subject ]</a>
<a href="author.html#7755">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>On Dec 12, 2011, at 1:38 AM, Rhyous wrote:
&gt;<i> I am getting this error too. The documentation states this should work.
</I>&gt;<i> <A HREF="http://docs.monodroid.net/index.aspx?link=T%3aAndroid.Widget.ArrayAdapter">http://docs.monodroid.net/index.aspx?link=T%3aAndroid.Widget.ArrayAdapter</A>
</I>&gt;<i>
</I>&gt;<i> I have created a very simple sample project that duplicates this issue.
</I>&gt;<i> <A HREF="http://www.rhyous.com/wp-content/uploads/2011/12/TestCustomObjectInArrayAdapter.zip">http://www.rhyous.com/wp-content/uploads/2011/12/TestCustomObjectInArrayAdapter.zip</A>
</I>
I'm sorry, this is: <A HREF="http://bugzilla.xamarin.com/show_bug.cgi?id=2347">http://bugzilla.xamarin.com/show_bug.cgi?id=2347</A>
The short term workaround is to change the TestCustomObjectInArrayAdapter.Device type to inherit Java.Lang.Object.
&gt;<i> Sure I can do that, but I'd like to know what changed from version 1.2 to
</I>&gt;<i> version 4.0 that causes the same, previously acceptable, code to now fail.
</I>
What happened is it regressed when I fixed a different array-handling bug:
<A HREF="http://bugzilla.xamarin.com/show_bug.cgi?id=1522">http://bugzilla.xamarin.com/show_bug.cgi?id=1522</A>
Thanks,
- Jon
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="007740.html">[mono-android] System.NotSupportedException with ArrayAdapter of custom object
</A></li>
<LI>Next message: <A HREF="007765.html">[mono-android] System.NotSupportedException with ArrayAdapter of custom object
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7755">[ date ]</a>
<a href="thread.html#7755">[ thread ]</a>
<a href="subject.html#7755">[ subject ]</a>
<a href="author.html#7755">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/monodroid">More information about the Monodroid
mailing list</a><br>
</body></html>