• 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: Kyle Sluder <email@hidden>
  • Date: Fri, 7 May 2010 09:29:45 -0700

On May 7, 2010, at 7:33 AM, G S <email@hidden> wrote:

Hi all. I have a couple of tabs on my window, each of which has an
NSTextView. You have to declare the IBOutlet variable in the app delegate
as an NSScrollView; only by doing that can you get the outlet to show up on
the Control-drag to the widget in Interface Builder.

No you don't. You just need to make sure that you try to wire up the right object.


So I have the outlets connected, but an attempt to call setTextValue on the
textview results in an "unrecognized selector" report. How do you set the
text in the textView? I tried getting the text container, but no dice.

Does NSScrollView claim to respond to -setTextValue:? Does *anything* claim to respond to -setTextValue:?


You can't make up method names and send them to arbitrary objects expecting things to work. The NSTextView documentation describes the methods it responds to. Wire up your text view rather than it's enclosing scroll view and use those methods to accomplish your goal.

--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


References: 
 >How do you set the text in an NSTextView? (From: G S <email@hidden>)

  • Prev by Date: Re: How do you set the text in an NSTextView?
  • Next by Date: Problem with font display
  • 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