Re: Specifying a class which conforms to a protocol
Re: Specifying a class which conforms to a protocol
- Subject: Re: Specifying a class which conforms to a protocol
- From: Nathan Day <email@hidden>
- Date: Tue, 30 Jul 2002 17:00:04 +0930
I think the only way to do this is dynamicly by using
+conformsToProtocol:, alternatively you can take a prototype object and
then copy it instead, NSMatrix can work like this.
On Monday, July 29, 2002, at 09:20 AM, David Newberry wrote:
In my app, I have a class which I want to create instances of another
class. To allow for more freedom though, I don't want to tie it down to
creating only one kind of class... the only real requirement is that
the class conform to a particular (formal) protocol. I've set it up so
that the class to use is passed as a Class variable, but it wont let me
specify something like "(Class <myProtocol>)class", which is what I'd
like to do. Is there any way to do this?
Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
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.