Questions tagged [responder-chain]

40 questions
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
  • 2,872
  • 3
  • 22
  • 47
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…
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
  • 6,763
  • 3
  • 40
  • 71
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,389
  • 2
  • 23
  • 48
0
votes
0 answers

Where are SKNode positioned in the responder chain?

SKNode inherits from NSResponder but I'm having trouble understanding how nodes are included in the responder chain and where they are inserted. For example, how does a SKNode receive the mouseDown: message? When a view is clicked, a hit testing…
Daniel Farrell
  • 7,970
  • 6
  • 34
  • 55
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,523
  • 14
  • 69
  • 110
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
  • 7,592
  • 9
  • 54
  • 95
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
  • 12
-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
  • 32,792
  • 46
  • 221
  • 426
1 2
3