Bug 12377 - Objective Sharpie 0.2 (16) does not properly generate binding code for delegates
Summary: Objective Sharpie 0.2 (16) does not properly generate binding code for delegates
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C Binding ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: 4.0.9 (from master)
Assignee: Bugzilla
Depends on:
Reported: 2013-05-24 02:12 UTC by Lucian Torje
Modified: 2014-03-12 10:48 UTC (History)
7 users (show)

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

objective c header (1.05 KB, application/octet-stream)
2013-05-24 02:12 UTC, Lucian Torje
generated code (1.04 KB, application/octet-stream)
2013-05-24 02:13 UTC, Lucian Torje
This is the expected generated code (1.30 KB, application/octet-stream)
2013-05-24 02:16 UTC, Lucian Torje
Updated expected result (1.46 KB, application/octet-stream)
2013-05-24 02:25 UTC, Lucian Torje

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:

Description Lucian Torje 2013-05-24 02:12:55 UTC
Created attachment 4013 [details]
objective c header

Steps to reproduce:
- create a class and protocol in xcode like in the attached test.h
- open objective sharpie, choose ios and generate

- something like test_expected.cs

- names like FMDatabase converted into FmDatabase
- method with no parameter converted into getter, fine for classes, wrong for delegates
Comment 1 Lucian Torje 2013-05-24 02:13:14 UTC
Created attachment 4014 [details]
generated code
Comment 2 Lucian Torje 2013-05-24 02:16:43 UTC
Created attachment 4015 [details]
This is the expected generated code
Comment 3 Lucian Torje 2013-05-24 02:25:14 UTC
Created attachment 4016 [details]
Updated expected result
Comment 4 Miguel de Icaza [MSFT] 2013-06-03 17:44:12 UTC

Objective Sharpie provides the basic scaffolding for an API binding and uses a series of heuristics to determine type names and what should be a method or a property.   Those are not perfect and we expect developers to make those adjustments after they get the initial scaffolding in place.
Comment 5 PJ 2013-06-24 16:18:52 UTC
This bug was marked as fixed for Xamarin Studio 4.0.9, which is currently in the beta channel. Try it out!
Comment 6 Aaron Bockover [MSFT] 2013-06-24 16:23:02 UTC
PJ: I think you commented on the wrong bug.