Re: Enabling menu items...

2009-12-18 Thread Jim Majure
So i tried one of the suggestions, which was to add a new menu item (as opposed to using the default one). When I did this, they BOTH started to work. I can't explain what happened. Of course, I would swear that I was doing things right, but... It may have been pure user error, or IB migh

Re: Enabling menu items...

2009-12-18 Thread Jens Alfke
On Dec 18, 2009, at 7:52 AM, Doug Knowles wrote: > It's been my experience that validateUserInterfaceItem: is only called for > toolbar items; there may be other cases, but I haven't run across them, and > I've never seen it called on menu items. No, that's not true; it's called for menu items a

Re: Enabling menu items...

2009-12-18 Thread Doug Knowles
Hi, Jim, Try implementing validateMenuItem: instead. It's been my experience that validateUserInterfaceItem: is only called for toolbar items; there may be other cases, but I haven't run across them, and I've never seen it called on menu items. When I do use validateUserInterfaceItem: (for butto

Re: Enabling menu items...

2009-12-17 Thread Quincey Morris
On Dec 17, 2009, at 12:20, Jim Majure wrote: > I tried your suggestion of changing the action to "myDelete:", but it still > doesn't work. Something else responding to the action first seems like a > possible problem. > I added "myDelete:" to the First Responder in IB, then tied the "Delete" men

Re: Enabling menu items...

2009-12-17 Thread Jim Majure
I tried your suggestion of changing the action to "myDelete:", but it still doesn't work. Something else responding to the action first seems like a possible problem. I added "myDelete:" to the First Responder in IB, then tied the "Delete" menu item to it using click-drag. I changed the name

Re: Enabling menu items...

2009-12-17 Thread Quincey Morris
[Reposted to list after being misdirected. Slightly edited from the original.] On Dec 17, 2009, at 09:57, Jim Majure wrote: > I wish that were the case. However, the validateUserInterfaceItem: message > isn't being invoked for "delete:" > > Here's the relevant code. > > - (BOOL) acceptsFirstRe

Re: Enabling menu items...

2009-12-17 Thread Jim Majure
The "Auto Enables Items" is checked. When I control-click the menu item in IB, under "Sent Actions" it shows "delete:" (with the colon) linked to "First Responder". (The "Cut" menu item is configured exactly the same way in the same drop down menu (with a different action) and it works.) I

Re: Enabling menu items...

2009-12-17 Thread Kyle Sluder
On Thu, Dec 17, 2009 at 9:57 AM, Jim Majure wrote: > I wish that were the case. However, the validateUserInterfaceItem: message > isn't being invoked for "delete:" Are you sure the menu on which the Delete item is located has its "Auto Enables Items" (aka -autoenablesItems) setting checked in IB?

Re: Enabling menu items...

2009-12-17 Thread Jim Majure
Quincey, I wish that were the case. However, the validateUserInterfaceItem: message isn't being invoked for "delete:" Here's the relevant code. - (BOOL) acceptsFirstResponder { NSLog(@"acceptsFirstResponder"); return YES; } - (IBAction) delete:(id) sender { NSLog(@"de

Re: Enabling menu items...

2009-12-17 Thread Quincey Morris
On Dec 17, 2009, at 09:24, Jim Majure wrote: > I'm having problems enabling the "Edit>Delete" menu item on a custom view. > Here's what I have tried: > > - I have linked the Delete menu item to the "delete:" selector of the First > Responder in IB. > - I have implemented the "(IBAction) delete

Enabling menu items...

2009-12-17 Thread Jim Majure
Hello, I'm having problems enabling the "Edit>Delete" menu item on a custom view. Here's what I have tried: - I have linked the Delete menu item to the "delete:" selector of the First Responder in IB. - I have implemented the "(IBAction) delete: (id) sender;" on my custom view. - I have