• 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: Protocols/Distributed Notifications and Compatibility
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Protocols/Distributed Notifications and Compatibility


  • Subject: Re: Protocols/Distributed Notifications and Compatibility
  • From: Andy Lee <email@hidden>
  • Date: Sat, 6 Apr 2002 11:01:43 -0500

At 3:08 AM -0800 4/5/02, Sam Goldman wrote:
How do I create a protocol for a Cocoa application. I know that it goes
inside @protocol and @end, but I don't know what to put inside and what it
does. From what I gather from the archives it can be used to send
notifications between the two applications and that is something I want to
do.

"Protocol" in the @protocol/@end sense is not related to "protocol" in the network communications sense. They're completely different concepts. Objective-C's @protocol is a language construct and has nothing to do with communicating between apps, between hosts, or between languages.

An Objective-C @protocol is a list of method declarations that is independent of any particular class. When you declare that a class "conforms to" a protocol, you are promising that the class implements the methods listed in the protocol. Unrelated classes can conform to the same protocol.

You should be able to find more info in the Objective-C docs in the Developer directory. I haven't looked, so if the documentation is poor or if you have questions about what it says, feel free to ask me on or off the list. For examples of protocols, you can grep header files for @protocol, and search the Cocoa class docs for "Protocol".

--Andy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Protocols/Distributed Notifications and Compatibility (From: Sam Goldman <email@hidden>)

  • Prev by Date: Re: problem with NSMatrix
  • Next by Date: Re: problem with NSMatrix
  • Previous by thread: Protocols/Distributed Notifications and Compatibility
  • Next by thread: Common UI
  • Index(es):
    • Date
    • Thread