• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMenuItem protocol and incompatible types.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenuItem protocol and incompatible types.


  • Subject: Re: NSMenuItem protocol and incompatible types.
  • From: Fredrik Olsson <email@hidden>
  • Date: Tue, 01 Aug 2006 08:21:33 +0200

Matt Neuburg skrev:
On Mon, 31 Jul 2006 13:58:17 +0200, Fredrik Olsson
<email@hidden> said:
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.

Not OMM. I just did this:

    NSMenuItem* foo = [editMenu itemAtIndex: 3];

It compiled and ran just fine. And I have a LOT of warning settings turned
on - including that I can't compile at all if there are any warnings (I'm
treating warnings as errors). So what warning settings do you have turned
on? Or maybe the problem is just that you are sending itemAtIndex: to
something that is not, in fact, an NSMenu*. m.

The only special about my project is that PPC targets 10.3.9, and Intel targets 10.4. Is it that NSMenuItem protocol was depeciated in 10.4? I can not se any version number mentioned in the warning text.

But still, is not (id <NSMenuItem>) a valid typecast?

// Fredrik Olsson

_______________________________________________
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


References: 
 >Re: NSMenuItem protocol and incompatible types. (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: CoreData unresolved keypath after save
  • Next by Date: Re: URL caching with XMLDoc from url
  • Previous by thread: Re: NSMenuItem protocol and incompatible types.
  • Next by thread: launchd and Cocoa apps?
  • Index(es):
    • Date
    • Thread