gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenuItem and NSValidatedUserInterfaceItem


From: Fred Kiefer
Subject: Re: NSMenuItem and NSValidatedUserInterfaceItem
Date: Mon, 05 Jan 2009 22:15:16 +0100
User-agent: Thunderbird 2.0.0.18 (X11/20081112)

Quentin Mathé wrote:
> With r27415, NSMenuItem class was made conform to
> NSValidatedUserInterfaceItem. This causes a compilation warning when an
> object of the type id <NSMenuItem> is assigned to a variable of the type
> NSMenuItem *. For example, the following line currently causes a warning
> with GNUstep trunk:
> NSMenuItem *menuItem = [menu itemWithTag: aTag];
> To eliminate the warning and maintain Cocoa compatibility (where
> NSMenuItem protocol is deprecated), I suggest to make NSMenuItem
> protocol conform to NSValidatedUserInterfaceItem protocol. By doing so,
> NSMenuItem class doesn't have to conform to NSValidateduserInterfaceItem
> protocol anymore and everything compiles without warning.
> A more detailed presentation of the issue is available here:
> http://review.etoileos.com/r/68/

This seems to be one of the possible solutions, another one would be to
eliminate the usage of the protocol all together and have all the
methods on NSMenu deal with NSMenuItems, just as Apple did it. I am not
sure which solutions I would prefer. Anybody out there with a strong
opinion?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]