• 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: implement directly a protocol?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: implement directly a protocol?


  • Subject: Re: implement directly a protocol?
  • From: "John C. Randolph" <email@hidden>
  • Date: Sat, 10 Nov 2001 06:51:30 -0800

On Saturday, November 10, 2001, at 06:38 AM, email@hidden wrote:

Is it permitted to implement directly a protocol?

Protocols are just a list of methods. Only Classes have methods, so only clases can implement a protocol.

The reason I ask is that the compiler doesn't complain for:

@protocol A
@end

@implementation A

The effect of this is to declare a class and a protocol that are both named "A". In the Foundation Framework, for example, there are both the NSObject class, and the NSObject protocol.

-jcr


"The right to be heard does not include the right to be taken seriously." - Hubert Humphrey


References: 
 >implement directly a protocol? (From: email@hidden)

  • Prev by Date: Re: Nibtool for translation
  • Next by Date: Re: New Cocoa Programmer
  • Previous by thread: Re: implement directly a protocol?
  • Next by thread: Re: implement directly a protocol?
  • Index(es):
    • Date
    • Thread