• 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
addObserver problem with protocols
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

addObserver problem with protocols


  • Subject: addObserver problem with protocols
  • From: "Mohan Parthasarathy" <email@hidden>
  • Date: Wed, 14 Jan 2009 14:18:55 -0800

Hi,

I have protocol X that is implemented by a few classes of my own. These
classes are not known directly to my main code but only through the protocol
(id<protocol>). When my main code tries to addObserver:self to the object
id<protocol>, i get a warning saying that my protocol does not implement it.
This would have worked if i used the real object behind. What should i do ?
Just add a method like addObserver in the protocol and in the real object
make the method just invoke the [super addobserver]. Or is there a better
way to solve it ?

thanks
mohan
_______________________________________________

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: addObserver problem with protocols
      • From: Greg Parker <email@hidden>
    • Re: addObserver problem with protocols
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: KVC error from bound SortDescriptor
  • Next by Date: Re: addObserver problem with protocols
  • Previous by thread: Re: NIB's owner doesn't get released because of NSArrayController
  • Next by thread: Re: addObserver problem with protocols
  • Index(es):
    • Date
    • Thread