• 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
Typeing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Typeing


  • Subject: Typeing
  • From: David Remahl <email@hidden>
  • Date: Wed, 27 Jun 2001 11:30:09 +0200

I have the following statement:

NSEnumerator* enum = [[[NSApp delegate] arrayOfObjects] objectEnumerator];

I know that my application delegate responds to arrayOfObjects, but the compiler doesn't [know what object is my app delegate], so it gives me this warning:

warning: cannot find method
warning: return type for 'arrayOfObjects' defaults to id

The code doesn't break, since id is fine for this purpose, but the warnings are annoying and hide the real warnings...

So, how do I statically type [NSApp delegate] so that the compiler understands what I am trying to do?

/ david


  • Follow-Ups:
    • Re: Typeing
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: NSTask and NSPipe
  • Next by Date: Re: Library loading policy on Mac OS X with Cocoa
  • Previous by thread: Strange problem with lots of NSGregorianDates
  • Next by thread: Re: Typeing
  • Index(es):
    • Date
    • Thread