On May 7, 2010, at 7:33 AM, G S <[email protected]> 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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to