Re: NSTextView to replace NSTextList confused
Re: NSTextView to replace NSTextList confused
- Subject: Re: NSTextView to replace NSTextList confused
- From: Papa-Raboon <email@hidden>
- Date: Sun, 29 Jun 2008 20:58:18 +0100
Hi Kyle and thanks for responding. I am not sure what part of the
documentation you refer to when you say cocoa text system but I
started reading about NSTextView and NSText and to be honest until I
get more familiar with cocoa and everything clicks into place the
documentation seems very confusing and tends to assume previous
programming knowledge and a good understanding of the nuances of this
sort of code. I have dabbled with other languages but the only
language I managed to get a good understanding of was PHP. Cocoa seems
a lot more disciplined in it's structure to me than PHP which is very
forgiving indeed.
So at the moment people have been kindly telling me what to do to
achieve each little bit of my project that I don't understand and I
have been figuring out bits myself along the way. this method seems to
work best for me as I have started to figure out more and more without
help. So I think I understand what you mean about not using NSString
with an NSTextView but if you fancy throwing together a couple of
lines of code so I can see visually how it's done then I think I will
have a better chance of understanding it eventually.
If you don't have time to then I understand totally. I am sure newbies
like me can be a little demanding at times :-)
Thanks
Paul
2008/6/29 Kyle Sluder <email@hidden>:
> 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