redo: action not in First Responder
In our MainMenu.xib, we previously had Undo and Redo hooked up to our own actions, but now want to use the standard undo: and redo: actions. I'm able to choose undo:, but redo: does not appear in the list of known actions in the First Responder. Any ideas? -- Steve Mills office: 952-818-3871 home: 952-401-6255 cell: 612-803-6157 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: redo: action not in First Responder
On Jul 2, 2013, at 10:40:52, Keary Suska aksu...@frequentflyerservices.com wrote: On Jul 2, 2013, at 9:16 AM, Steve Mills wrote: In our MainMenu.xib, we previously had Undo and Redo hooked up to our own actions, but now want to use the standard undo: and redo: actions. I'm able to choose undo:, but redo: does not appear in the list of known actions in the First Responder. Any ideas? I have found that for whatever reason First Responder does not have all possible action methods in Interface Builder. The action is -redo:, so simply add it to First Responder and it will be there from then on. I don't see an obvious way to add a new action to First Responder. I finally got it to work by adding a new action to some random class in the app, letting Xcode index that file, then after a couple tries the new redo: method finally showed up when I right-dragged from the menu item to the First Responder. That seems like a total hack when there should be an obvious button or something in First Responder's action list that allows the user to easily add a new action. -- Steve Mills office: 952-818-3871 home: 952-401-6255 cell: 612-803-6157 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: redo: action not in First Responder
On 2013 Jul 02, at 09:10, Steve Mills smi...@makemusic.com wrote: I finally got it to work by … I don't recall which Apple document explains this, but the Undo and Redo menu items in a Cocoa app are internally connected to some special magic. They don't work like normal menu items. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: redo: action not in First Responder
On Jul 2, 2013, at 09:10 , Steve Mills smi...@makemusic.com wrote: That seems like a total hack when there should be an obvious button or something in First Responder's action list that allows the user to easily add a new action. There is a button, but it's obvious only after you know where it is. Select the First Responder item in the list of XIB components on the left of the editing pane. Display the Attributes inspector in the pane at the right of the window, and you'll see a list of custom actions to which you can add actions. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: redo: action not in First Responder
On Tue, Jul 2, 2013, at 10:01 AM, Jerry Krinock wrote: On 2013 Jul 02, at 09:10, Steve Mills smi...@makemusic.com wrote: I finally got it to work by … I don't recall which Apple document explains this, but the Undo and Redo menu items in a Cocoa app are internally connected to some special magic. They don't work like normal menu items. That's certainly not the case for any apps that we ship. And a brand-new Cocoa App created from template has Undo and Redo hooked up to First Responder exactly as you'd expect. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: redo: action not in First Responder
On Jul 2, 2013, at 12:27:30, Kyle Sluder k...@ksluder.com wrote: On Tue, Jul 2, 2013, at 10:01 AM, Jerry Krinock wrote: On 2013 Jul 02, at 09:10, Steve Mills smi...@makemusic.com wrote: I finally got it to work by … I don't recall which Apple document explains this, but the Undo and Redo menu items in a Cocoa app are internally connected to some special magic. They don't work like normal menu items. That's certainly not the case for any apps that we ship. And a brand-new Cocoa App created from template has Undo and Redo hooked up to First Responder exactly as you'd expect. Perhaps Jerry is thinking of NSManagedObjectContext, which is some mystery class that does all sort of stuff, along with funneling undo and redo to the right place? -- Steve Mills office: 952-818-3871 home: 952-401-6255 cell: 612-803-6157 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: redo: action not in First Responder
On Jul 2, 2013, at 12:10:22, Quincey Morris quinceymor...@rivergatesoftware.com wrote: There is a button, but it's obvious only after you know where it is. Select the First Responder item in the list of XIB components on the left of the editing pane. Display the Attributes inspector in the pane at the right of the window, and you'll see a list of custom actions to which you can add actions. Ah, thanks. One usually finds that sort of thing in the same pane that the actual list resides. *grumble* -- Steve Mills office: 952-818-3871 home: 952-401-6255 cell: 612-803-6157 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: redo: action not in First Responder
On Jul 2, 2013, at 1:53 PM, Steve Mills smi...@makemusic.com wrote: On Jul 2, 2013, at 12:10:22, Quincey Morris quinceymor...@rivergatesoftware.com wrote: There is a button, but it's obvious only after you know where it is. Select the First Responder item in the list of XIB components on the left of the editing pane. Display the Attributes inspector in the pane at the right of the window, and you'll see a list of custom actions to which you can add actions. Ah, thanks. One usually finds that sort of thing in the same pane that the actual list resides. *grumble* I clearly need to read up on undo management, but purely based on experience with the rest of IB, I find it odd that the default Undo and Redo menu items have actions that are not publicly declared -- at least undo: and redo: are not in NSResponder.h, NSObject.h, or in the documentation. Those actions are not listed in the Attributes inspector of the default MainMenu.xib, so it seems like *some* sort of special-casing is going on behind the scenes. I notice there is a little yellow triangle next to the redo: action, but not the undo:, which again strikes me as odd. I would have guessed you could copy and paste the Undo menu item from some other project, but that didn't work for me. The pasted menu item had no target or action. In any case, you have it working now. --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: redo: action not in First Responder
On 2013 Jul 02, at 10:47, Steve Mills smi...@makemusic.com wrote: Perhaps Jerry is thinking of… The document I was thinking of is … OS X doc set Data Management Undo Architecture Using Undo in AppKit-Based Applications Undo and the Responder Chain Usually it just works but if you're doing something weird you may need to read that. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com