Why my FirstResponder in InterfaceBuilder's file is missing redo:
connection (in Received Actions
list)? undo:
exists, but redo:
doesn't. How could I fix it?
Asked
Active
Viewed 745 times
7

hockeyman
- 1,141
- 6
- 27
- 57
-
I don't understand your question at all, could you please elaborate? – Manuel Jan 16 '13 at 15:03
-
In InterfaceBuilder's file (default name: MainMenu.xib) there always is object named `FirstResponder`. It always has some default connections. And if you want to implement `NSUndoManager` you need to use FirstResponder's connections `undo:/redo:`. And I have implemented `NSUndoManager`. Added `FirstResponder`'s `undo:` connection to button witch should do undo function. It works. Now I need `redo:` connection from `FirstResponder` to add redo function. And it always could be found in `FirstResponder`, but now there is no `redo:` connection in my `FirstResponder`. Why could it be so? – hockeyman Jan 16 '13 at 15:10
-
He means that when he has the `First Responder` placeholder item selected in a nib file, and has the connections inspector open, `undo:` is not among one of the listed `Received Actions`... – NSGod Jan 16 '13 at 15:10
-
4.5.2. I created new project and there exists both connections in first responder, but in my current project `redo:` doesn't exists – hockeyman Jan 16 '13 at 15:14
2 Answers
17
This is a bug. The workaround is to throw this in a file somewhere:
@interface NSResponder (Redo)
- (IBAction)redo:(id)sender;
@end
Then make your connection in Interface Builder. Once that is done you can delete this code.

nrj
- 1,701
- 2
- 22
- 37
1
This is a bug in Xcode, it doesn't see the redo: action even though it is there. As a workaround you can create a custom action redo: for making the connection.
See my Radar here: http://www.cocoanetics.com/2013/01/radar-interface-builders-first-responder-is-missing-some-editing-actions/

Cocoanetics
- 8,171
- 2
- 30
- 57