Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
- Subject: Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
- From: Marcel Weiher <email@hidden>
- Date: Mon, 7 Jun 2004 18:46:42 +0100
Once you have the wrapper, you don't need a NSDictionary subclass,
True, but if you DO subclass then you can make it otherwise
transparent to the user (e.g. not require the user to ever see the
wrappers at all).
In that case, it tends to be better not to use a subclass, but rather
to use an NSDictionary in your implementation. Which I have also done.
(duh!)
and you cannot (easily) do it with a subclass without the wrapper.
You can however, quite straightforwardly
You said you could do it using subclassing. You can't.
We had already discussed the "wrapper" approach and were done with it
when you brought it up again. And you didn't even bring it up
directly, but only once you realized that your claim that this was
solvable via subclassing was in fact, quite false.
Good grief.
build something that as far as the user is concerned acts just
exactly like an NSDictionary save for the copying of the key objects
that are passed in.
Or you could use CFDictionary, NSMapTable, or build your own. This was
also discussed already.
I did ask you to *read* and *understand* the previous posts before
posting. Please!
I have implemented 2-3 of these wrapper classes myself.
I'll resist the temptation to suggest that you should have designed it
better then, since if you'd done it right you would only have needed
to implement one of these :-)
Yes, you *should* resist that temptation.
Next!
Sounds like a good plan.
Yes. Please come back when you have *read* and *understood* what was
posted.
Cheers,
Marcel
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
1d480c25f397c4786386135f8e8938e4
_______________________________________________
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.