Re: NSTextView to replace NSTextList confused
Re: NSTextView to replace NSTextList confused
- Subject: Re: NSTextView to replace NSTextList confused
- From: "Kyle Sluder" <email@hidden>
- Date: Sat, 28 Jun 2008 21:40:06 -0400
On Sat, Jun 28, 2008 at 8:28 PM, Papa-Raboon <email@hidden> wrote:
> So I did this and changed the header file for my mainController to
> take the NSTextView into consideration by changing:
>
> IBOutlet NSTextField * theNotes;
>
> to:
>
> IBOutlet NSTextView *theNotes;
>
> I then built and ran the project and surprise surprise it didn't work.
> In Xcode I get the following:
> warning 'NSTextView' may not respond to '-stringValue'
> (Messages without a matching method signature will be assumed to
> return 'id' and accept '...' as arguments.).
>
> Any ideas what I am doing wrong please anyone.
Look at the documentation for NSTextView. Notice how it doesn't
implement -stringValue? Neither do any of its superclasses.
Therefore you can't send an NSTextView a -stringValue message and
expect anything meaningful. NSTextView does inherit from NSText,
though, which responds to -string by returning the backing store.
Do read the documentation for the Cocoa Text System. NSTextView is
different from (and far more powerful than) NSTextField.
--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