Re: How do I create a mutable version of my object?
Re: How do I create a mutable version of my object?
- Subject: Re: How do I create a mutable version of my object?
- From: Stéphane Sudre <email@hidden>
- Date: Mon, 20 Jan 2003 17:32:04 +0100
On Monday, January 20, 2003, at 05:29 PM, Jens Bauer wrote:
Hi Stiphane,
On Monday, Jan 20, 2003, at 12:38 Europe/Copenhagen, Stiphane Sudre
wrote:
On Monday, January 20, 2003, at 08:24 AM, Jens Bauer wrote:
I've been searching the net, both GNUStep, my mail and mamasam, but
I could not find specific information about how to make my object
mutable.
I've collected a few guesses, and I might be wrong in some of the
cases.
I have a stupid suggestion.
Make your MyExampleArray use a NSMutableArray of MyExample objects
and don't allow adding/removing objects with methods from
MyExampleArray but add some in the MyMutableExampleArray.
Doesn't this require me to add objects of type NSObject?
MyExample is a subclass of NSObject.
In fact, that was my first approach, then I discarded it, probably
because I saw how NSString and NSArray did it. ;)
Yes, also because:
I think I will get in trouble, when creating a MyMutableExampleArray,
and then passing it as parameter to a method that takes a
MyExampleArray, won't I ?
I don't think since MyMutableExampleArray would be subclass of
MyExampleArray. MyMutableExampleArray has just more methods.
_______________________________________________
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.