Re: Is this possible without multiple inheritance?
Re: Is this possible without multiple inheritance?
- Subject: Re: Is this possible without multiple inheritance?
- From: publiclook <email@hidden>
- Date: Fri, 4 Jul 2003 10:23:18 -0400
Wanting to be both a string and a set seems like a very unlikely
combination. Please explain what you are trying to achieve.
Anything can be done without multiple inheritance. Anything can be
done without inheritance at all. If all you are trying to do is pass
-isKindOfClass: tests, you implement -isKindOfClass: to return anything
you want under any conditions. You are free to forward any messages
that you receive to any object...
You might consider a composition relationship rather than a containment
relationship. ("has a" verses "is a")
On Friday, July 4, 2003, at 03:23 AM, Kyle Moffett wrote:
I have a particular object that needs to belong to both the NSString
and NSSet class clusters. Unfortunately, I don't see any way to
accomplish this without multiple inheritance of some sort. I am
considering just subclassing NSObject and re-implementing several
NSObject methods to fool things into thinking that my class belongs to
both, but that kind of hackery is dreadful. Is there any way at all
to do this neatly?
Thanks in Advance,
Kyle Moffett
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a16 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP? t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r
!y?(-)
------END GEEK CODE BLOCK------
_______________________________________________
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.
_______________________________________________
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.