• 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: The Unadopted Protocol
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Unadopted Protocol


  • Subject: Re: The Unadopted Protocol
  • From: Quincey Morris <email@hidden>
  • Date: Wed, 2 Jun 2010 10:23:25 -0700

On Jun 2, 2010, at 08:57, Matt Neuburg wrote:

> So this appears to be a technique for implementing a highly informal
> protocol.

What's the problem that this technique is intended to solve?

This is one of several techniques that can be used to send an arbitrary message to an arbitrary object without a compiler warning.

Note, though, that in the example you gave, 'testing' is a *private* method of MyClass (since MyClass chose not to put the method in its public @implementation), so you've violated MyClass's API contract. If 'testing' really is private, invoking it externally seems like a bad idea. If it's really public, declaring it so (in MyClass.h) seems like a good idea.


_______________________________________________

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

References: 
 >The Unadopted Protocol (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Spotlight-Style search menu (SOLVED)
  • Next by Date: Delayed -dealloc occurs on worker thread if object is "working". How?
  • Previous by thread: Re: The Unadopted Protocol
  • Next by thread: Re: The Unadopted Protocol
  • Index(es):
    • Date
    • Thread