Bug 32773 - Accessing item in NSTokenField[] returns a NSMutableString opposed to NSTokenField.
Summary: Accessing item in NSTokenField[] returns a NSMutableString opposed to NSToken...
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: Master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Chris Hamons
Depends on:
Reported: 2015-08-04 18:19 UTC by Colby Williams
Modified: 2015-09-23 17:03 UTC (History)
1 user (show)

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

Repro Project (16.64 KB, application/zip)
2015-08-04 18:19 UTC, Colby Williams
Screenshots of breakpoint showing issue (37.53 KB, application/zip)
2015-08-04 18:21 UTC, Colby Williams

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 Colby Williams 2015-08-04 18:19:12 UTC
Created attachment 12353 [details]
Repro Project

When accessing an item in a `NSTokenField[]` collection, it returns a `NSMutableString` opposed to `NSTokenField`.  `NSTokenField` inherits from `NSTextField : NSControl`.

Steps to repro:

1) Run/launch sample Xamarin.Mac project (attached)
2) Add two names to either the top of bottom fields in the window
3) Click/drag one of the added names to the opposite field
Comment 1 Colby Williams 2015-08-04 18:21:17 UTC
Created attachment 12354 [details]
Screenshots of breakpoint showing issue
Comment 2 Chris Hamons 2015-09-23 17:03:25 UTC
You are completely correct. This API is totally busted and never worked.

Fixed in master / 4f0c01e23844f6da63eb74d9d83b687b18a1bce8

Thanks for the complete repro example. It made fixing this a breeze.