• 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: Keary Suska <email@hidden>
  • Date: Wed, 18 Mar 2009 15:51:56 -0600

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


  • Follow-Ups:
    • Re: compile warning re not implementing protocol
      • From: Dennis Christopher <email@hidden>
References: 
 >compile warning re not implementing protocol (From: Dennis Christopher <email@hidden>)

  • Prev by Date: Re: gcc and bitwise right shift
  • Next by Date: More indentation issues in XCode 3
  • Previous by thread: compile warning re not implementing protocol
  • Next by thread: Re: compile warning re not implementing protocol
  • Index(es):
    • Date
    • Thread