• 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: NSTextView/NSTextField Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView/NSTextField Question


  • Subject: Re: NSTextView/NSTextField Question
  • From: Mike Brinkman <email@hidden>
  • Date: Thu, 03 Jan 2002 14:26:22 -0500

Problem solved, but I was able to do the following:

[item setObject:[itemDescription string] forKey:@"itemDescription"];

Thanks for the quick response though!

Mike

--
The premiere source of Mike Brinkman related news on the internet!
http://www.mikebrinkman.com


on 1/3/02 2:18 PM, Andrew Mortensen at email@hidden
wrote:

>
> Try this:
>
> (assuming an instance of NSTextView or a subclass called textView)
>
> NSString *longString = [ textView string ];
>
> The -string method is found in NSText, which NSTextView inherits. It
> should return the entire contents of the NSTextView.
>
> andrew
>
> On Thu, 3 Jan 2002, Mike Brinkman wrote:
>
>> I just made an item editor for a simple game I'm making. It consists of
>> several NSTextFields and an NSTableView for storing the info once I add an
>> item. For the text fields, I'm using [item setObject:[itemName stringValue]
>> forKey:@"itemName"]; to store the info into the table for the text fields.
>>
>> One of the fields is an item description. I've got it stretched so it can
>> accommodate 3 lines of text, but the possibility exists that the description
>> could be longer than 3 lines. I'm limited in the size of the field due to my
>> application's layout, and I really don't want to change it.
>>
>> Ideally, I'd like to use NSTextView for this field, but I can't find a
>> method for getting a string value from an NSTextView. Does such a method
>> exist? If not, does anybody know a way I can add a scroll bar into an
>> NSTextField? I've checked the foundation & app kit docs, but can't find
>> anything.
>>
>> Thanks for any help you can give.
>>
>> Mike Brinkman
>>
>>
>> --
>> The premiere source of Mike Brinkman related news on the internet!
>> http://www.mikebrinkman.com
>> _______________________________________________
>> cocoa-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>> Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: NSTextView/NSTextField Question
  • Next by Date: Re: NSTextView/NSTextField Question
  • Previous by thread: Re: NSTextView/NSTextField Question
  • Next by thread: Re: NSTextView/NSTextField Question
  • Index(es):
    • Date
    • Thread