Re: Problem with NSValueTransformer, NSTableView and NSAttributedString
Re: Problem with NSValueTransformer, NSTableView and NSAttributedString
- Subject: Re: Problem with NSValueTransformer, NSTableView and NSAttributedString
- From: Kyle Sluder <email@hidden>
- Date: Mon, 22 Jun 2009 22:35:36 -0700
On Mon, Jun 22, 2009 at 9:12 PM, Jim Correia<email@hidden> wrote:
> The documentation for the value binding of NSTableView says that NSString
> and NSNumber are the supported value types.
I do not see where you're finding this. The bindings documentation
says: "The object should be suitable for the passing to
setObjectValue." Maybe it's in the conceptual docs?
Which is a shame, really. If I were designing this API, I would add a
method to NSCell called -setNumberValue:, which takes an NSNumber
instance and uses the cell's attached number formatter to convert it
into a string, which it then passes to -[self setStringValue:] (lack
of an attached number formatter would raise an exception.) Then I'd
add an option to the value binding that allowed the user to choose
between the binding invoking -setObjectValue:, -setStringValue:,
-setAttributedStringValue:, and -setNumberValue:.
But I didn't design the API. All I can do is file a radar. Luckily,
you can too.
--Kyle Sluder
_______________________________________________
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