[Mono-bugs] [Bug 629741] New: using an annotation that is registered as Register("MKAnnotation") causes an error

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Aug 9 19:52:32 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=629741

http://bugzilla.novell.com/show_bug.cgi?id=629741#c0


           Summary: using an annotation that is registered as
                    Register("MKAnnotation") causes an error
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Macintosh
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Runtime
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: bryancostanich at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Customer
           Blocker: ---


Created an attachment (id=381728)
 --> (http://bugzilla.novell.com/attachment.cgi?id=381728)
solution file with repro

Description of Problem:
if you create a custom MKAnnotation that inherits from NSObject and implements
the Coordinate property (as required): 
        [MonoTouch.Foundation.Register("MKAnnotation")]
        protected class BasicMapAnnotationProto : NSObject
        {
            [Export("coordinate")]
            public CLLocationCoordinate2D Coordinate { get; set; }
            public string Title { get; set; }
            public string Subtitle { get; set; }
        }


when you add it, via:
            this.mapMain.AddAnnotationObject(
                new BasicMapAnnotationProto() { Coordinate = new
CLLocationCoordinate2D(34.120, -118.188), Title = "Los Angeles", Subtitle =
"City of Demons" }
            );

you get an error that says unrecognized select set to instance.

Steps to reproduce the problem:
-> see attached solution
-> run
-> click on map tab
-> click on map annotated map button
-> it crashes.


Actual Results:
-> [MKAnnotation coordinate]: unrecognized selector sent to instance 0xf70c3e0
error.

Expected Results:


How often does this happen? 
-> everytime.

Additional Information:
-> code is in Screens/iPhone/Maps/AnnotatedMapScreen.xib.cs.
-> maybe i'm not doing something right. but i looked up the selector on
tirania/rosetta and the apple docs say that's the only required property.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list