On 11 Nov 2010, at 12:41, Remco Poelstra wrote:
> Op 10-11-2010 15:31, Quincey Morris schreef: >> On Nov 10, 2010, at 06:10, [email protected] wrote: >> >>> I was just thinking that the overrides would provide a convenient point to >>> process all requests for undefined properties. >>> Depends on the design and requirements of the model I suppose. >> >> I don't think that's happening here -- the property isn't undefined >> initially, it just has an incorrect value initially. :) >> >> The point is, I think, to avoid overriding 'valueForKey:', because of the >> potential horrendous performance problems that could result. > > Thanks for all replies. I think I've a problem there. I store all my > properties in a NSMutableDictionary, so implementing my own getters is not > possible. I tried overriding valueForKey: by subclassing NSMutableDictionary, > but soon found out that was not possible as it is a cluster. > 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? I would try composition. Regards Jonathan Mitchell Developer Mugginsoft LLP http://www.mugginsoft.com_______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
