Questions tagged [responder-chain]
43 questions
0
votes
1 answer
How can I Invoke tableview cell click event out of tableview frame?
Is there a way when I touch the point which out of tableview frame,invoke tableview delegate function -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath?
I've tried override superview of tableview's -(UIView…

cs Kim
- 1
0
votes
1 answer
NSWindow loses first responder after dismissing NSPopover
I have a window that presents a popover with a bunch of text fields. I want these text fields to be tabbable but not focused when the popover appears. To achieve this I set the first responder to nil when the popover appears:
// Inside popover's…

Ian Bytchek
- 8,804
- 6
- 46
- 72
0
votes
1 answer
NSApp.sendAction() only works after some time
I want a ViewController (ContainerVC) to react on clicks on child custom views (ChildView).
In ChildView I override mouseDown(_:) to handle the click. In this method I try to call the ContainerVC target via…

mic
- 907
- 6
- 17
0
votes
1 answer
Why should -[NSTextInputClient doCommandBySelector:] not pass the event up the responder chain?
A text view should not forward uninvokable commands up the responder chain, the docs say for -[NSTextInputClient doCommandBySelector:]:
If aSelector cannot be invoked, then doCommandBySelector: should not pass this message up the responder chain.…

ctietze
- 2,805
- 25
- 46
0
votes
1 answer
Changing Tab-Order (Focus) in a cocoa-App
I have a simple view with 4 textfields tf1 - tf4.
I want to set the initial focus on tf2, that works fine.
Then I want, that tf1 gets focus, then tf2 again - that does not work, the focus cycles through all 4 textfields.
I tried like this:
override…

mica
- 3,898
- 4
- 34
- 62
0
votes
1 answer
Implementing responder action in Swift
I am having difficulty implementing an action for an NSMenuItem in Swift. Normally, you implement the action like this in Objective-C:
- (void) asdf:(id)sender
This works perfectly fine, after setting up the action in the first responder like…

Daniel Node.js
- 6,734
- 9
- 35
- 57
0
votes
1 answer
Unable to get mouse events to register in custom NSViewController
Here's my code, simplified for brevity:
class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet weak var window: NSWindow!
var fooController: FooController!
func applicationDidFinishLaunching(aNotification: NSNotification) {
…

Charlie Schliesser
- 7,851
- 4
- 46
- 76
0
votes
1 answer
How to keep a hidden view in responder chain?
I have a NSSplitViewController and in one of the items I have multiple buttons with keyboard shortcuts.
Once the user hides the item, the shortcuts don't fire.
Is there any way to keep the buttons in the hidden view as part of the responder chain?

mangerlahn
- 4,746
- 2
- 26
- 50
0
votes
1 answer
adding delegate to responder chain stops scrolling from working
For a number of reasons, I have added my class that implements NSOutlineViewDelegate protocol to the responder chain:
[myOutlineView setNextResponder:self];
This stops my outline view from scrolling. Take the call out - scrolling works fine, put it…

Gordon
- 23
- 3
0
votes
2 answers
UIControl Target Action event not flowing up the responder chain
I've got a UIButton inside a UITableViewCell which is held in a table, which is owned by my UITableViewController subclass. I'm trying to make use of the feature of target/action pairs where it can bubble up events to its next responder until it…

jbrennan
- 11,943
- 14
- 73
- 115
0
votes
1 answer
iOS: Can nextResponder be another app?
This question is related (inspired) to my previous question:
iOS: Handle remote-control events and then relay the events to music apps
My app can become the first responder to remote-control events.
However, I'd like my app to relay the…

kakyo
- 10,460
- 14
- 76
- 140
0
votes
1 answer
UIGesture returns UIImageView and not custom view
I have added a custom view to my rootview and added a UITapGesture. When calling on the 'sender.view' of the UITapGesture code it no longer is represented by my custom UIView, but instead 'sender.view' is of type UIImageView.
So it really makes it…

MplsRich
- 137
- 1
- 13
-1
votes
2 answers
macOS - Menu actions do not trigger any action if the app is not active
I am building this app that will sit on the menu bar.
So, as normally is done with this kind of app, you adjust the statusItem menu to be the menu of your app.
The items on that menu trigger actions on the first responder, that in my case is the…

Duck
- 34,902
- 47
- 248
- 470