Re: How do you set the text in an NSTextView?
Re: How do you set the text in an NSTextView?
- Subject: Re: How do you set the text in an NSTextView?
- From: G S <email@hidden>
- Date: Fri, 7 May 2010 23:02:59 -0700
Thanks for the replies, guys.
On Fri, May 7, 2010 at 9:20 AM, Jens Alfke <email@hidden> wrote:
> -setString:. It’s declared in the superclass NSText, which makes it easy to
> miss. (NSText is an abstract class and really only exists for historical
> reasons.)
>
>
This doesn't do anything, because the IBOutlet isn't connected to the text
field. It's impossible to make that connection if the NSTextView is defined
as an NSTextView in the app delegate:
@interface CSVToXMLAppDelegate : NSObject <NSApplicationDelegate>
{
NSWindow* window;
NSTextField* sourceFilePath;
NSButton* selectFileBtn;
NSButton* convertBtn;
NSTextView* statusText;
NSTextView* resultText;
NSButton* saveBtn;
NSButton* quitBtn;
CSVConverter* _converter;
}
@property (assign) IBOutlet NSWindow* window;
@property (assign) IBOutlet NSTextField* sourceFilePath;
@property (assign) IBOutlet NSTextView* statusText;
@property (assign) IBOutlet NSTextView* resultText;
Interface Builder shows that this control is an NSScrollView. Repeatedly
clicking on it does not drill down any further; NSScrollView is the end of
the line. The class is never shown as NSTextView. Check out what happens
if you Control-drag from the app delegate to the supposed NSTextView
control:
Screen shot<http://farm5.static.flickr.com/4071/4587918609_e65753593f_o.png>
_______________________________________________
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