Re: First Responder Problem [Solved]
Re: First Responder Problem [Solved]
- Subject: Re: First Responder Problem [Solved]
- From: Anders Totland <email@hidden>
- Date: Sat, 6 Mar 2004 10:17:59 +0100
Ok, this is an odd one. I have an NSView subclass (B3StructureView, as
seen in Beware of Molecules 3). The view is rigged to accept first
responder, and it does. It's rigged up to respond to cut:, copy:,
paste: and delete:, and it does, because the menu items are enabled.
What it does not do, however, is actually trigger these methods when
asked. Example:
- (void)copy:(id)sender
{
NSLog(@"something");
}
When I select the copy menu item, which is enabled, and the views first
responderness is verified, the build log shows: Nothing! I have seen
something like this before, but it solved itself. Anybody got a clue as
to what is going on?
Oh my, oh my, silly silly me. It turns out the action won't be called
unless it is defined in the header of a class, yet it is discovered by
the menu. Well, now we know that...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.