• 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: compile warning re not implementing protocol
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile warning re not implementing protocol


  • Subject: Re: compile warning re not implementing protocol
  • From: Dennis Christopher <email@hidden>
  • Date: Thu, 19 Mar 2009 09:28:33 -0400

Thanks Keary,

The wording of the warning confused me. Explicitly declaring AppController as an implementor of the protocol solved the problem. I did notice that I had to import the delegate protocol class header into AppController.h--just @class was insufficient--in case anyone else has this problem..

Dennis
On Mar 18, 2009, at 5:51 PM, Keary Suska wrote:

On Mar 18, 2009, at 10:46 AM, Dennis Christopher wrote:

All,

Not sure if the list archive search is working properly, but I find
nothing searching under 'protocol' that addresses this puzzle.

I have a class PersonalInfoController that declares a protocol and a
class AppController that implements it. The two protocol methods are
declared publicly in AppController. Why then does the following call
in AppController

[self setPersonalInfoController:[PersonalInfoController
controllerWithDelegate:self]];

Get the compiler warning

"The class AppController does not implement the
PersonalInfoControllerDelegate protocol."


Did you specify in your @interface declaration for AppController that
it adopts your protocol? If so, do you use the syntax id <protocol> to
declare a variable or parameter? That usage is non-intuitive (i.e. it
doesn't work like you might think). Better to explicitly check
conformance by calling -conformsTo: or +conformsToProtocol:.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >compile warning re not implementing protocol (From: Dennis Christopher <email@hidden>)
 >Re: compile warning re not implementing protocol (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: gcc and bitwise right shift
  • Next by Date: Can Xcode 'Run' deployed/installed product instead of a symlink?
  • Previous by thread: Re: compile warning re not implementing protocol
  • Next by thread: Re: Referencing (antlr) generated header files from another target's $DERIVED_FILES_DIR [SOLVED?]
  • Index(es):
    • Date
    • Thread