NSResponder is a class used in Mac Development. NSResponder is an abstract class that forms the basis of event and command processing in the Application Kit. The core classes—NSApplication, NSWindow, and NSView—inherit from NSResponder, as must any class that handles events. The responder model is built around three components: event messages, action messages, and the responder chain.
Questions tagged [nsresponder]
106 questions
1
vote
0 answers
How to pass mouse events from NSView to NSViewController?
I have TabViewController, and i have Make custom NSView for it TabView which i have inherits in XIB.
Now i have successfully implemented all mouse handle events in TabView and worked.
I want the same events in TabViewController, But i can't.
I…

Solid Soft
- 1,872
- 2
- 25
- 55
1
vote
2 answers
Keyboard focus lost after inserting and editing new object, when NSArrayController „Auto Rearrange Content“ is enabled
I have a master-detail kind of application OS X 10.9 only:
An NSTableView on the left side of the window, the details as NSTextFields on the right side.
I have not set the tab order specifically, out of the box works just fine.
Except after…

MartinW
- 4,966
- 2
- 24
- 60
1
vote
1 answer
How can i change IKImageBrowserView’s doubleclick behaviour?
I use a IKImageBrowserView in a Mac 10.9-only application.
When I doubleclick an item in the IKImageBrowserView the item is opened in Preview.
I want to change this behaviour and open a window of my own application with details about the…

MartinW
- 4,966
- 2
- 24
- 60
1
vote
1 answer
All controls disabled in title-less window
In my app I've got a secondary NSWindow that's created from .xib in my NSWindowController in my initWithWindowNibName: method. The window is a plain NSWindow with the title bar switched off.
After creating the window it's shown using…

ATV
- 4,116
- 3
- 23
- 42
1
vote
1 answer
Best place to intercept Cmd-Key in NSDocument based app
What would be the most appropriate place to intercept CmdAnyKey key events in an NSDocument based application?
Intention is to switch to some component in the active window - kind of like Firefox allows you to switch the tabs - without having a…

ATV
- 4,116
- 3
- 23
- 42
1
vote
2 answers
NSViewController mouseDown: not called
I have a NSWindowController where I'm adding my corresponding ViewControllers. I would like to handle touch events in one of the ViewController. My class is
Window.h
@interface WindowController : NSWindowController
@property …

Xander
- 902
- 2
- 14
- 33
1
vote
2 answers
Mac OSX Dev : Custom ViewController not receiving Mouse Events
I need to create a quick demo app (asap). It has a NSImageView (with a full window sized photo) and the mouse point clicks, drags and moves over this.
There is also an NSTextField (Label) to show the mouse event and position over the window.
I've…

iOSProgrammingIsFun
- 1,418
- 1
- 15
- 32
1
vote
1 answer
Controlling NSSegmentedControl with the keyboard
I have a form in my Cocoa app that contains an NSSegmentedControl that I want to be controllable via the keyboard. It seems that NSSegmentedControl is very reluctant to become the first responder, however.
Setting the initial first responder of the…

jlong64
- 928
- 10
- 13
0
votes
1 answer
delegate member in NSMenu
From my understanding the delegating class is the one which always inherits from NSResponder class and delegate is only available to classes that inherits from NSResponder. NSMenu inherits directly from NSObject, so then why do i see…

JamesWebbTelescopeAlien
- 3,547
- 2
- 30
- 51
0
votes
1 answer
Intercepting undo while editing a cell-based table view
I'd like to intercept or disable Cmd-Z/Shift-Cmd-Z during a text editing session for a table view cell.
It's a cell-based table view with a series of columns whose values affect each other, such that filling in some columns will populate others…

paulmelnikow
- 16,895
- 8
- 63
- 114
0
votes
1 answer
Why are certain repeated keys ignored by interpretKeyEvents in NSResponder?
I have an NSView that calls interpretKeyEvents for keyDown events. For some keys like the letter 'a', pressing and holding the key results in repeated calls to insertText. For other keys like 'x', insertText is called once and that is it. I would…

jimspin
- 1
- 2
0
votes
0 answers
Disable that AVPlayerView stops video when pressing the pause ⏯️ key
Currently I am using an AVPlayerView in combination with an AVPlayer in my Cocoa App.
The video plays fine but I want to disable that the AVPlayerView or AVPlayer responds to key presses that for example pause the video with the pause key⏯️.
Is…

user10802841
- 57
- 6
0
votes
0 answers
How can I auto populate other textfields while a user edits first textfield?
I am building a macOS app with multiple text fields. While a user is editing the first text field, I want all the other text fields to autopopulate (according to the int value of the first text field).
So far, I can auto-populate the fields when the…

Zara
- 1
- 1
0
votes
1 answer
keyDown: is not responding even though the class it is implemented in acceptsFirstResponder
I have made my NSView in my application.
- (BOOL) acceptsFirstResponder
{
return YES;
}
Now my implemented keyDown: doesnt respond... the breakpoint or NSBeep(); I have implemented dont fire.
My implmented mouseDown in that same class works…

theprojectabot
- 1,163
- 12
- 19
0
votes
0 answers
What is the proper design pattern for handling keyDown: events in a NSSplitView?
I would like to have separate KeyDown: handlers for each of the various subviews in a complex splitview based Window. In addition, I would like to have a "global" KeyDown: handler at the WindowController level for any keys that are not handled by…

bgdegazio
- 19
- 5