зеркало из https://github.com/mono/mail-archives.git
169 строки
8.2 KiB
HTML
169 строки
8.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [mono-android] New Mono for Android release does not work with some samples on GitHub
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20New%20Mono%20for%20Android%20release%20does%20not%20work%20with%0A%20some%20samples%20on%20GitHub&In-Reply-To=CACWcBbk%2BKtJ9om5Mu%3DpSyX_8FyRho-X2yOrPFPch1R9LsLexAg%40mail.gmail.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="007542.html">
|
|
<LINK REL="Next" HREF="007546.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[mono-android] New Mono for Android release does not work with some samples on GitHub</H1>
|
|
<B>Tomasz Cielecki</B>
|
|
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20New%20Mono%20for%20Android%20release%20does%20not%20work%20with%0A%20some%20samples%20on%20GitHub&In-Reply-To=CACWcBbk%2BKtJ9om5Mu%3DpSyX_8FyRho-X2yOrPFPch1R9LsLexAg%40mail.gmail.com"
|
|
TITLE="[mono-android] New Mono for Android release does not work with some samples on GitHub">tomasz at ostebaronen.dk
|
|
</A><BR>
|
|
<I>Tue Dec 6 03:55:38 EST 2011</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="007542.html">[mono-android] New Mono for Android release does not work with some samples on GitHub
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007546.html">[mono-android] New Mono for Android release does not work with some samples on GitHub
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7543">[ date ]</a>
|
|
<a href="thread.html#7543">[ thread ]</a>
|
|
<a href="subject.html#7543">[ subject ]</a>
|
|
<a href="author.html#7543">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Is this because Overlay item is inheriting from System.Object rather
|
|
than Java.Lang.Object?
|
|
|
|
public class OverlayItem : Object
|
|
|
|
On Tue, Dec 6, 2011 at 9:45 AM, Tomasz Cielecki <<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">tomasz at ostebaronen.dk</A>> wrote:
|
|
><i> I get the same error even if CreateItem returns OverlayItem. So
|
|
</I>><i> something is wrong somewhere.
|
|
</I>><i>
|
|
</I>><i> On Tue, Dec 6, 2011 at 9:43 AM, Tomasz Cielecki <<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">tomasz at ostebaronen.dk</A>> wrote:
|
|
</I>>><i> OK. About that OverlayItem. I have a Custom overlay item which looks like this:
|
|
</I>>><i>
|
|
</I>>><i>    class NMTOverlayItem : OverlayItem
|
|
</I>>><i>    {
|
|
</I>>><i>        private float[] color;
|
|
</I>>><i>
|
|
</I>>><i>        public NMTOverlayItem(GeoPoint point, String title, String
|
|
</I>>><i> snippet, float[] color)
|
|
</I>>><i>            : base(point, title, snippet)
|
|
</I>>><i>        {
|
|
</I>>><i>                    this.color = color;
|
|
</I>>><i>        }
|
|
</I>>><i>
|
|
</I>>><i>        public float[] Color
|
|
</I>>><i>        {
|
|
</I>>><i>            get { return color; }
|
|
</I>>><i>        }
|
|
</I>>><i>    }
|
|
</I>>><i>
|
|
</I>>><i> Now in the itenized overlay I have the CreateItem method:
|
|
</I>>><i>
|
|
</I>>><i>        protected override NMTOverlayItem CreateItem(int index)
|
|
</I>>><i>        {
|
|
</I>>><i>            return overlayItems.ElementAt(index);
|
|
</I>>><i>        }
|
|
</I>>><i>
|
|
</I>>><i> I get the following error:
|
|
</I>>><i>
|
|
</I>>><i> 'NSPublic.AndroidClient.NMTItemizedOverlay.CreateItem(int)': return
|
|
</I>>><i> type must be 'Java.Lang.Object' to match overridden member
|
|
</I>>><i> 'Android.GoogleMaps.ItemizedOverlay.CreateItem(int)'
|
|
</I>>><i>
|
|
</I>>><i> Any ideas as to why this is happening?
|
|
</I>>><i>
|
|
</I>>><i> On Mon, Dec 5, 2011 at 6:52 PM, Tomasz Cielecki <<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">tomasz at ostebaronen.dk</A>> wrote:
|
|
</I>>>><i> Awesome, will give it a go tomorrow :-)
|
|
</I>>>><i>
|
|
</I>>>><i> As always good job on the new release!
|
|
</I>>>><i>
|
|
</I>>>><i> On Dec 5, 2011 5:38 PM, "Jonathan Pryor" <<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">jonp at xamarin.com</A>> wrote:
|
|
</I>>>>><i>
|
|
</I>>>>><i> On Dec 5, 2011, at 11:25 AM, Tomasz Cielecki wrote:
|
|
</I>>>>><i> > Due to changes to how sensors work, i.e. stuff being moved into
|
|
</I>>>>><i> > SensorTypes the samples on GitHub do not work anymore.
|
|
</I>>>>><i>
|
|
</I>>>>><i> Changes needed to get the samples working with the new release were done
|
|
</I>>>>><i> on the release-2-0 branch, which was just merged to master ~10 minutes ago.
|
|
</I>>>>><i> Please update your repo and see if that fixes it. :-)
|
|
</I>>>>><i>
|
|
</I>>>>><i> > Also there has been some changes in the ItemizedOverlay now having the
|
|
</I>>>>><i> > CreateItem method registered, but it needs to return a
|
|
</I>>>>><i> > Java.Lang.Object, does that mean that my custom OverlayItem has to
|
|
</I>>>>><i> > inherit from Java.Lang.Object? I thought OverlayItem was already a
|
|
</I>>>>><i> > Java.Lang.Object?
|
|
</I>>>>><i>
|
|
</I>>>>><i> OverlayItem inherits Java.Lang.Object, so your class inheriting from
|
|
</I>>>>><i> OverlayItem will also inherit Java.Lang.Object, just not directly.
|
|
</I>>>>><i>
|
|
</I>>>>><i> Subclassing OverlayItem is fine (and required, iirc).
|
|
</I>>>>><i>
|
|
</I>>>>><i> > Is there a list of changes made in the newest release somewhere?
|
|
</I>>>>><i>
|
|
</I>>>>><i>
|
|
</I>>>>><i> <A HREF="http://android.xamarin.com/Releases/Mono_for_Android_4/Release_4.0.0#API_Changes">http://android.xamarin.com/Releases/Mono_for_Android_4/Release_4.0.0#API_Changes</A>
|
|
</I>>>>><i>
|
|
</I>>>>><i>  - Jon
|
|
</I>>>>><i>
|
|
</I>>>>><i> _______________________________________________
|
|
</I>>>>><i> Monodroid mailing list
|
|
</I>>>>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">Monodroid at lists.ximian.com</A>
|
|
</I>>>>><i>
|
|
</I>>>>><i> UNSUBSCRIBE INFORMATION:
|
|
</I>>>>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">http://lists.ximian.com/mailman/listinfo/monodroid</A>
|
|
</I>>><i>
|
|
</I>>><i>
|
|
</I>>><i>
|
|
</I>>><i> --
|
|
</I>>><i> Med Venlig Hilsen / With Best Regards
|
|
</I>>><i> Tomasz Cielecki
|
|
</I>>><i> <A HREF="http://ostebaronen.dk">http://ostebaronen.dk</A>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> --
|
|
</I>><i> Med Venlig Hilsen / With Best Regards
|
|
</I>><i> Tomasz Cielecki
|
|
</I>><i> <A HREF="http://ostebaronen.dk">http://ostebaronen.dk</A>
|
|
</I>
|
|
|
|
|
|
--
|
|
Med Venlig Hilsen / With Best Regards
|
|
Tomasz Cielecki
|
|
<A HREF="http://ostebaronen.dk">http://ostebaronen.dk</A>
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="007542.html">[mono-android] New Mono for Android release does not work with some samples on GitHub
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007546.html">[mono-android] New Mono for Android release does not work with some samples on GitHub
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7543">[ date ]</a>
|
|
<a href="thread.html#7543">[ thread ]</a>
|
|
<a href="subject.html#7543">[ subject ]</a>
|
|
<a href="author.html#7543">[ 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>
|