• 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: Xcode warns about missing protocol definition, even though @protocol is used
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode warns about missing protocol definition, even though @protocol is used


  • Subject: Re: Xcode warns about missing protocol definition, even though @protocol is used
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 14 Apr 2012 10:00:02 -0700

On Apr 14, 2012, at 5:55 AM, Florian Pilz wrote:

> NewFooController.h:
>    #import <UIKit/UIKit.h>
>    @protocol NewFooControllerDelegate;
>    @interface NewFooController : UITableViewController
>        @property (nonatomic, weak) id<NewFooControllerDelegate> delegate;
>    @end
>
>    @protocol NewFooControllerDelegate
>    @end
>
> HomeTableViewController.h:
>    #import <UIKit/UIKit.h>
>    // warning points to line below
>    @interface HomeTableViewController : UITableViewController <NewFooControllerDelegate>
>    @end


You never imported NewFooController.h here, so when the compiler is compiling something that imported HomeTableViewController.h, it can't find the @protocol definition.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Xcode warns about missing protocol definition, even though @protocol is used
      • From: Florian Pilz <email@hidden>
References: 
 >Xcode warns about missing protocol definition, even though @protocol is used (From: Florian Pilz <email@hidden>)

  • Prev by Date: Re: Opening a gap in NSTableView during drag and drop
  • Next by Date: Re: Bookmark alias files v. Finder alias files
  • Previous by thread: Xcode warns about missing protocol definition, even though @protocol is used
  • Next by thread: Re: Xcode warns about missing protocol definition, even though @protocol is used
  • Index(es):
    • Date
    • Thread