Op 11-11-2010 13:48, Graham Cox schreef:

On 11/11/2010, at 11:41 PM, Remco Poelstra wrote:

Leaves me wondering whether I should hardcode all properties (82 items) on my 
own object or try to make a more intelligent subclass of NSMutableDictionary. 
Or maybe a composite object?


If the requirement is simply to distinguish between an uninitialised value and 
a real value, why not just implement your own object with a method 
-valueForKey: and do whatever you want in there. It could have a 
NSMutableDictionary as a backing store. One method (not 82) and problem solved.

Sounds so simple I'm surely missing something....

Seems so :) I just tried that and observing the change of properties is now non-functional, as the request for observing is not forwarded to the NSDictionary behind my own object. Seems I've to override a whole lot of methods to forward them all to the backingstore.

Regards,

Remco Poelstra
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to