• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do you set the text in an NSTextView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How do you set the text in an NSTextView?
      • From: Mark <email@hidden>
    • Re: How do you set the text in an NSTextView?
      • From: Kyle Sluder <email@hidden>
References: 
 >How do you set the text in an NSTextView? (From: G S <email@hidden>)
 >Re: How do you set the text in an NSTextView? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Modal window that does not block the main runloop
  • Next by Date: Re: self = [super init], nil?
  • Previous by thread: Re: How do you set the text in an NSTextView?
  • Next by thread: Re: How do you set the text in an NSTextView?
  • Index(es):
    • Date
    • Thread