Re: Getting a reference to an NSMenuItem from another nib?
Re: Getting a reference to an NSMenuItem from another nib?
- Subject: Re: Getting a reference to an NSMenuItem from another nib?
- From: mmalcolm crawford <email@hidden>
- Date: Tue, 14 Jun 2005 12:04:34 -0700
On Jun 14, 2005, at 8:53 AM, Pandaa wrote:
the reason I want to avoid the NSMenuValidation protocol, is
demonstrated very well by Apple's example code:
- (BOOL)validateMenuItem:(NSMenuItem*)anItem {
int row = [tableView selectedRow];
if ([[anItem title] isEqualToString:@"Next Record"]&&
[...]
Using isEqualToString indeed is a bad practice, because it is both
slower than necessary and will not work well with localization. Use
selectors instead.
This should be considered a documentation bug. I've filed a report.
To repeat a plea: If you (in the general sense, not just Pandaa) see
examples like this in the documentation that are erroneous or
misleading, please file bug reports.
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden