Bug 43750 - Cannot register iOS category with a parameter
Summary: Cannot register iOS category with a parameter
Status: RESOLVED DUPLICATE of bug 42489
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.8 (tvOS / C7)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-25 15:30 UTC by michael.clifford
Modified: 2016-08-25 17:46 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 42489

Description michael.clifford 2016-08-25 15:30:00 UTC
When trying to register the category below in C#, I get the error "Failed to compile the generated registrar code." It works when only registering the first Export, without a parameter.

/Users/.../ReloAccessMobile/ReloAccess.iOS/MTOUCH: Error MT4109: Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com (MT4109) (ReloAccess.iOS)

    [Category(typeof(UILabel))]
    public static class UILabelCategory
    {
        [Export("fontName")]
        public static NSString FontName(this UILabel self)
        {
            return new NSString(self.Font.Name);
        }

        [Export("setFontName:")]
        public static void SetFontName(this UILabel self, NSString fontName)
        {
            self.Font = UIFont.FromName(fontName, self.Font.PointSize);
        }
    }
Comment 1 Rolf Bjarne Kvinge [MSFT] 2016-08-25 17:46:19 UTC

*** This bug has been marked as a duplicate of bug 42489 ***