Skip navigation.
 
mlNSMenuItem protocol and incompatible types.
FROM : Fredrik Olsson
DATE : Mon Jul 31 13:58:17 2006

The documentation for the NSMenuItem protocol states that it is to be
removed from AppKit, and that I should replace id <NSMenuItem> to
reference the class NSMenuItem. When I do NSMenu's method itemAtIndex:
complains of incompatible types.

Even typecasting as;
NSMenuItem *foo = (id <NSMenuItem>)[barMenu itemAtIndex:baz];
Gives the same warning. Requiring the typecast when depreciating the
protocol seems strange to begin with. What am I missing here?


// Fredrik Olsson

Related mailsAuthorDate
mlNSMenuItem protocol and incompatible types. Fredrik Olsson Jul 31, 13:58
mlRe: NSMenuItem protocol and incompatible types. Matt Neuburg Jul 31, 21:17
mlRe: NSMenuItem protocol and incompatible types. Fredrik Olsson Aug 1, 08:21
mlRe: NSMenuItem protocol and incompatible types. Jakob Olesen Aug 1, 09:35