Bug 27821 - NSCancelButtonCell Activated
Summary: NSCancelButtonCell Activated
Status: RESOLVED ANSWERED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: Master
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-10 10:49 UTC by Marius Ungureanu
Modified: 2016-12-06 22:42 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 ANSWERED

Description Marius Ungureanu 2015-03-10 10:49:20 UTC
I have an NSSearchFieldCell with an NSCancelButtonCell inside it. On Yosemite, I can successfully do something in the `Activated` event, whilst on Mavericks, it's not getting called.
Comment 1 Chris Hamons 2015-03-25 15:52:36 UTC
Marius, can you post an example? I think we should try it in Xcode, because this sounds like an apple behavior change and not XM.
Comment 2 Marius Ungureanu 2015-03-25 16:38:47 UTC
Just add any Activated handler to that piece. I don't know how to do things in Xcode.

Add an NSSearchField access the CancelButtonCell then add activated handler.

See that it's not called on Mavericks, but called on Yosemite.
Comment 3 Chris Hamons 2015-03-25 16:47:26 UTC
^
Comment 4 Chris Hamons 2016-12-06 22:42:18 UTC
I took a look at this issue and we are clearly setting the Target/Action in a macOS version independent manor.

Some research uncovered http://stackoverflow.com/questions/7365625/objective-c-nsbutton-setaction-not-working and that there were a number of responder changes in Yosemite.

I bet your Cells were not in the responder chain in the case where it was not working. Without an example I can't verify this concretely, but it fits what I've been able to find/prove.