Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7967751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:58:20+00:00 2026-06-04T06:58:20+00:00

I have created a notes field designed to hold multiple paragraphs of text which

  • 0

I have created a “notes” field designed to hold multiple paragraphs of text which I would like to store in a custom object. Originally, I just used an NSTextField as a temporary solution, but this does not allow me to scroll or have multiple paragraphs of text…

In IB I have placed a NSTextView (which seems to be wrapped inside an NSScrollView.) Upon execution of my program, seems to allow me to enter text in multiple paragraphs, scroll, etc. In short it LOOKS to be exactly what I want would like it to be. So far so good.

Now, I need to retrieve the data from this field and store it in my custom object. This is where I’m getting a bit lost within the developer documentation…

My goals are fairly straight forward:

  1. Allow users to type away in the box.

  2. Store the contents of the box into a variable (array, etc.) in my custom object when the user moves to another field, leaving the notes field.

  3. Display the users stored text in the text box next time the record is viewed.

Second, is there a simple way to retrieve and store the data into a “notes” variable in my custom object (such as an NSString object? I would think having multiple would exclude an NSString object as an option here, but maybe I’m wrong) or am I getting into a more complex area here (such as having to store it in an array of NSString objects, etc.)?

Any help would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:58:21+00:00Added an answer on June 4, 2026 at 6:58 am

    You can get the data using -string, defined by NSText (e.g. NSString *savedString = [aTextView string])

    Your save code can be put in your NSTextDelegate (read, delegate of the NSTextView, because it’s the immediate superclass), in – textDidEndEditing: which will be called, well, when editing is finished (e.g. when the user clicks outside the view) or one of the other methods.

    Then to reload the saved string if you emptied the text view or something, use [textView setString:savedString] before editing begins.

    NSTextDelegate documentation: here.


    I’m not sure what you mena when you say “store the contents of the box into a variable (array, etc.) Are you hoping for an array of custom notes? Text views store a string of data, so the easiest way of storing its value is using one string; if you need an array of notes you’d have to split the string value into different paragraphs, which shouldn’t be too hard.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a from which have a text field name 'empId' whose value
I have a WPF Path object which is created by reading nodes from a
hi i have created a trigger which i want to update a table field
I have a sql server 2005 table which has xml store in a text
I have two tree, which contains nodes, after I've created them, I take all
I have created a bar to appear over the keyboard for next/previous/done like the
I have a Drupal (v6.17) Content Type which includes a Taxonomy field. I want
Ok, here's the problem: I have a list of contacts, which i have created
I have a date stored within a text field with other text. Why didn't
Drupal 6. I have created a node type which consists of just a body

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.