So this is my setup:
Trivial NSWindowwith one NSTextFieldfor a custom entry plus Accept ' NSButton.
NSWindow
NSTextField
NSButton
The window is displayed for my document window as a sheet using beginSheetModalForWindow:completionHandler:
beginSheetModalForWindow:completionHandler:
I would like to close the sheet when the user presses the evacuation key, however, all I get is a funny system beep that tells me that he is not really expecting an evacuation key.
There are several similar questions in which we should just check cancelOperationsomewhere in the defendant chain. The fact is that my window controller (for a window / dialog on a sheet) is not even in the responder chain when I check it in the debugger.
cancelOperation
For a sheet displayed in such a way that the above chain of responders is still touching my document window. Weird
Therefore, any tips on how to properly connect to cancelOperationor to the Escape key will be greatly appreciated!
, , , "", . , Escape IB, . , , ""; , , AppKit .
, , , , , NSWindowController ; . Apple . , , , , . , - , . , .
NSWindowController
Source: https://habr.com/ru/post/1608939/More articles:PostgreSQL clause - GROUP BY - sqlOpenTok Video Call Issue when an app transitions from a background state to the foreground - iosConfirmation for email or phone number for the same text box in angularjs - javascriptЗапуск пакетного файла в окнах с использованием незаменимого - windowsHow to get MethodInfo for Enumerable.SequenceEqual - reflectionCore Spotlight Userinfo всегда пуст - iosTomEE startup problem - javaSignalR - multiple hubs - launch connections individually - javascriptAjax On Rest Api secure call - javascriptHow to perform boolean operation and boolean indexing using VIPS in Python? - pythonAll Articles