Re: setting the value of a Text View
Re: setting the value of a Text View
- Subject: Re: setting the value of a Text View
- From: Jeff LaMarche <email@hidden>
- Date: Mon, 15 Oct 2001 22:36:18 -0700
On Monday, October 15, 2001, at 09:37 PM, Ryan Dary wrote:
I have an NSTextView which I want to assign an NSNumber to. I have
setup
the text view to use a formatter so it displays the number correctly.
How do I assign the NSNumber to the NSTextView so that it uses the
formatter of the NSTextView?
Well, you could do something like this:
assuming these are your variables:
NSTextView *myTextView;
NSNumber *valueToSet;
you could do this:
[myTextView setString:[valueToSet stringValue]];
The formatter should do its thing without any further intervention from
you if it's been properly set.