Re: Abstract base classes in Objective C
Re: Abstract base classes in Objective C
- Subject: Re: Abstract base classes in Objective C
- From: Kevin Ballard <email@hidden>
- Date: Thu, 14 Apr 2005 02:12:59 -0400
On Apr 14, 2005, at 1:39 AM, Andrew White wrote:
Is there a way to tell the compiler "It's abstract, the definitions
are supposed to be missing"? I looked into protocols, but they
seem to be rather heavyweight and orthogonal to what I want.
Unlike Java interfaces, you don't seem to be able to treat a class
that conforms to protocol equivalently as if it were a class. But
it's possible I have misunderstood how to use them.
[snip]
Any suggestions? Are protocols what I'm looking for?
I believe protocols are what you want. What's the problem you're
having with them?
Just to clarify, this is how you use an object that conforms to a
protocol:
id <MyProtocol> obj = [foo getAnObject];
[obj method1];
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden