On Jan 13, 2009, at 1:18 PM, Mohan Parthasarathy wrote:
Does this make sense ?

Yes.

Or this is a bad idea ?

Yes.

Generally, anyway, it is indicative of bad design when your code seems to require dynamic generation of classes.

Not to say that there aren't specific cases where it is warranted -- bridging comes to mind -- but that they are few and far between.

In this case, it sounds like are effectively looking for something that can do key/value storage, possibly with the ability to monitor the changes and/or support KVC and the like?

Obviously, i can have a dictionary which can be
keyed in using the "entry" selected which in turn has the relevant object to
handle the selection.

That'll work fine, no need for a custom class. You could have a subclass of NSObject that has a name and stores an arbitrary set of key/value pairs in an NSMutableDictionary backing store (or NSMapTable, which can handle non-object values). Instances of this would then be shoved into your dictionary as needed.

b.bum
_______________________________________________

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