Bug 12125 - Methods in NSTokenFieldDelegate implementation are never called
Summary: Methods in NSTokenFieldDelegate implementation are never called
Status: RESOLVED FIXED
Alias: None
Product: MonoMac
Classification: Desktop
Component: Bindings ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-05-06 16:56 UTC by mwp1
Modified: 2013-05-19 13:25 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 FIXED

Description mwp1 2013-05-06 16:56:11 UTC
The NSTokenFieldDelegate marks all the delegate methods as abstract, forcing you to implement all of them. E.g.:

  public abstract string[] GetCompletionStrings(NSTokenField tokenField, string substring, int tokenIndex, int selectedIndex);


This is in contrast, to, say, the NSSplitViewDelegate, which marks the delegate as virtual, thus enabling you to implement only those delegate methods that you need:


  public virtual float SetMinCoordinateOfSubview(NSSplitView splitView, float proposedMinimumPosition, int subviewDividerIndex)
Comment 1 mwp1 2013-05-08 05:56:58 UTC
Addendum: furthermore, even when you implement all of the methods in the NSTokenFieldDelegate, they are never invoked, so it doesn't work at all.
Comment 2 Miguel de Icaza [MSFT] 2013-05-14 23:06:49 UTC
Fixed the first part: dropped the abstract from the methods.
Comment 3 mwp1 2013-05-19 12:17:42 UTC
Do you know what version this fix will show up in? Xamarin Studio 4.0.8 (build 2) still has all the methods marked as abstract.
Comment 4 Miguel de Icaza [MSFT] 2013-05-19 13:25:55 UTC
We do not have a date set, but it should be relatively soon.