Bug 22590 - NSTextStorage missing base class constructors
Summary: NSTextStorage missing base class constructors
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 1.10.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 2.0.x
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2014-09-03 05:23 UTC by Bart King
Modified: 2015-03-02 07:57 UTC (History)
5 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:
VERIFIED FIXED

Description Bart King 2014-09-03 05:23:22 UTC
In MonoMac.AppKit.NSTextStorage, there seems to be missing constructors so the base class constructors cannot be called.

In this case, NSTextStorage inherits from NSMutableAttributedString and certain constructors are not proxied by NSTextStorage.

For example, NSMutableAttributedString has the following constructor:

  public NSMutableAttributedString(string str, NSDictionary attributes) { ... }

This calls [NSMutableAttributedString initWithString:attributes:]

No such constructor exists for NSTextStorage, only the usual four (IntPtr, NSObjectFlag, NSCoder and empty).

Please add the missing forwarding constructors to NSTextStorage. These are:

  public NSMutableAttributedString(string str, CTStringAttributes attributes) 
  public NSMutableAttributedString(NSAttributedString other) 
  public NSMutableAttributedString(string str, NSDictionary attributes)
  public NSMutableAttributedString(string str)

Thanks!
Comment 1 Udham Singh 2014-11-03 11:37:15 UTC
I have checked this issue and observed that class "NSTextStorage" exist in namespace “MonoMac.AppKit” and below forwarding constructors are missing in class "NSTextStorage".

public NSMutableAttributedString(string str, CTStringAttributes attributes) 
public NSMutableAttributedString(NSAttributedString other) 
public NSMutableAttributedString(string str, NSDictionary attributes)
public NSMutableAttributedString(string str)

Screencast : http://www.screencast.com/t/kOrFR0qKCl

I have checked the same for both "Classic" and "Unified" project.

Please let me know if I have missed anything or have to check something else to confirm this issue?

Environment Info :

=== Xamarin Studio ===

Version 5.5.3 (build 6)
Installation UUID: ce927b2a-2c07-44c5-b186-09cfdafba6dc
Runtime:
	Mono 3.10.0 ((detached/e204655)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000023

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Xamarin.iOS ===

Version: 8.4.0.16 (Business Edition)
Hash: 80e9ff7
Branch: 
Build date: 2014-10-22 15:09:12-0400

=== Build Information ===

Release ID: 505030006
Git revision: fbe3e9453daf6a3bb9a9709ed22bec35f7c9056b
Build date: 2014-10-23 13:08:38-04
Xamarin addins: e44add2b39de4dd57c0742bb2e620dfad84c64c6

=== Operating System ===

Mac OS X 10.9.4
Darwin Xamarin76s-Mac-mini.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 2 Chris Hamons 2014-12-03 18:16:49 UTC
Missing bindings. 1.12 if we can make it, else 2.0.
Comment 3 Timothy Risi 2014-12-04 20:25:00 UTC
Fixed by fe7a692b2697e485c6d68b6a84b67c53ccff43f5
Comment 4 Udham Singh 2015-01-20 10:28:22 UTC
I have checked this issue and observed that below forwarding constructors are still missing in class "NSTextStorage".

public NSMutableAttributedString(string str, CTStringAttributes attributes) 
public NSMutableAttributedString(NSAttributedString other) 
public NSMutableAttributedString(string str, NSDictionary attributes)

And only forwarding constructors 'public NSMutableAttributedString(string str)' has been added in class "NSTextStorage" for both Classic and Unified project. 

I have also noticed that for "Unified" project some of the constructor (both child and parent class) is marked as protected and protected internal, while with stable xamarin.mac-1.10.0.18 these constructors are marked as public.

Please refer the screencast : http://www.screencast.com/t/7mTT981O1QJV

As of now I am reopening this issue. Please let me know if my understanding is incorrect for the same.

Thanks! 

Environment Info : 

=== Xamarin Studio ===

Version 5.7.1 (build 13)
Installation UUID: ce927b2a-2c07-44c5-b186-09cfdafba6dc
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.1.9 (Enterprise Edition)
Hash: d8e6436
Branch: 
Build date: 2015-01-18 17:38:20-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Enterprise Edition)
Android SDK: /Users/xamarin76/Desktop/android-sdk-macosx
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.12.0.4 (Enterprise Edition)

=== Build Information ===

Release ID: 507010013
Git revision: 8e357d6be321e716f361ebc9591e4cee7f217c21
Build date: 2015-01-15 14:23:22-05
Xamarin addins: a6842a7727f64e956f942b8160f7835c9d9076a4

=== Operating System ===

Mac OS X 10.9.5
Darwin Xamarin76s-Mac-mini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 5 Timothy Risi 2015-01-20 18:18:14 UTC
This is fixed on master but didn't make it into 1.12, so I'm changing the milestone to 2.0.x
Comment 6 Jatin 2015-03-02 07:57:09 UTC
We have checked and now class "NSTextStorage" exist in
namespace “MonoMac.AppKit” and below forwarding constructors are exist in
class "NSTextStorage".

public NSMutableAttributedString(string str, CTStringAttributes attributes) 
public NSMutableAttributedString(NSAttributedString other) 
public NSMutableAttributedString(string str, NSDictionary attributes)
public NSMutableAttributedString(string str)

Screencast: http://www.screencast.com/t/uYP5GIEj4L6b

checked the same for both "Classic" and "Unified" project

Environment Info:
Xamarin Studio
Version 5.8 (build 1041)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
	Mono 4.0.0 ((detached/2634099)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000017

Xamarin.Android
Version: 5.0.99.211 (Indie Edition)
Android SDK: /Users/Admin_Mac/Desktop/Anddk/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Xamarin Android Player
Version: Unknown version
Location: /Applications/Xamarin Android Player.app

Apple Developer Tools
Xcode 6.1.1 (6611)
Build 6A2008a

Xamarin.iOS
Version: 8.6.1.24 (Indie Edition)
Hash: 1ee873c
Branch: 
Build date: 2015-01-31 17:42:21-0500

Xamarin.Mac
Version: 1.13.1.397 (Indie Edition)

Build Information
Release ID: 508001041
Git revision: fb49f5b17bced266244831c07c28f9fc93915cb1
Build date: 2015-02-27 12:58:53-05
Xamarin addins: e88a2212bb7156a42ad6728b82e99846c3eea817

Operating System
Mac OS X 10.10.2
Darwin Admin-Macs-Mac-mini.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Nov 13 18:36:56 PST 2014
    root:xnu-2782.10.65~2/RELEASE_X86_64 x86_64