Re: Deleting contents of NSTextView...
Re: Deleting contents of NSTextView...
- Subject: Re: Deleting contents of NSTextView...
- From: Isaac Sherman <email@hidden>
- Date: Sun, 30 Jun 2002 21:28:40 -0400
on 6/30/02 10:46 AM, the method -(id)email@hidden:(id) sender:@"Sherm
Pendley"; returned:
>
On Sunday, June 30, 2002, at 10:36 AM, Albert Atkinson wrote:
>
>
> How would I go about deleting all the contents of an NSTextView? I
>
> tried the insertText method but as the name says, it does not
>
> replace the text, just inserts it. I need something like the
>
> setStringValue in the NSTextField.
>
>
Check the archives - someone asked this question exactly a year ago
>
today. ;-)
>
>
Seriously, though... check out the setString: method in NSTextView's
>
parent class, NSText.
>
>
A related question is, why does NSText define a different method for
>
this, instead of overriding NSControl's setStringValue: method as most
>
controls do?
>
>
sherm--
Because it doesn't actually inherit from NSControl. I thought the same
thing(a while ago, when setStringValue wouldn't work for some reason...),
but it inherits from NSResponder.
Take care,
--
Isaac Sherman
MotaSoft Software
http://homepage.mac.com/huperzoevs/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.