• 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 Hörnkvist <email@hidden>
  • Date: Sat, 10 Nov 2001 15:45:51 +0100

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

Is it permitted to implement directly a protocol? The reason I ask is that the compiler doesn't complain for:

@protocol A
@end

@implementation A

You're implementing the class A, not the protocol A. (@interface isn't necessary for declaring a class.)

Unless there is an @interface A:X declaration somewhere, you're implementing a root class.

The closest you can get to implementing a protocol is to use the Concrete Protocol framework (http://www.toastedmarshmallow.com/Frameworks), or write categories on the root class.


Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com


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

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