Re: Editing a dictionary using NSTableView
Re: Editing a dictionary using NSTableView
- Subject: Re: Editing a dictionary using NSTableView
- From: Graham Cox <email@hidden>
- Date: Mon, 27 Oct 2008 09:55:07 +1100
On 27 Oct 2008, at 9:41 am, Jason Coco wrote:
If I were doing it, I'd have a type key and let the user specify
what type s/he wanted, like in the current property list editor.
That way if the user wants to type a real number
but actually wants it to be a string for whatever reason, it could
be. In my experience, whenever you want to mix strings and various
number values, it's easiest to ask the
user what s/he's expecting to store rather than trying to guess.
When a new item is first added, the user picks the desired type at
that point, but once created, its type can't be changed.
The difficulty arises with subsequent editing of the actual value.
Since the dictionary already exists deep inside my data model and is
used by other code that is expecting 'simple' types like NSString and
NSNumber, I can't readily change this to use a wrapper object that
encodes the type explicitly. (Not sure if that's what you *were*
advocating, but that was what sprung to mind when I read it).
cheers, Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden