On 6 Jan 2009, at 11:06, Fred Kiefer wrote:
To be honest, I don't see any potential use for the protocol itself.
We
need to have an abstraction for the menu representation, but this is
already there. Why would anybody use menu items that aren't of a
subclass of NSMenuItem?
This is Objective-C, not C++. Types are just there as a hint to help
static error checking - there is nothing stopping you passing
something that isn't an NSMenuItem, but acts like one, to something
that expects an NSMenuItem. My recommendation would be to track the
Apple changes, since it makes porting from Cocoa easier, and because
it makes for people who use the Apple docs as a reference (e.g. me).
If we want to use something that isn't an NSMenuItem in future, we
just need an explicit cast and to make sure we implement all of the
public methods of NSMenuItem (which we'd need to do anyway with the
protocol).
David
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev