advertisement

Article:
  Working with Tables: Writing an Address Book Application
Subject:   Not working for NSTextViews?
Date:   2003-03-05 04:22:22
From:   anonymous2
Thanks for the great article.
I want to use NSTextViews instead of NSTextFields, i tried this but the following code won't work:


[record setObject:[firstNameView string]forKey:@"First Name"];


Somehow when you add the text from a NSTextView to the table it replaces the text of previously added records!


I worked around this by copying the text of the NSTextView to a NSTextField first like this:


[firstNameField setStringValue:[firstNameView string]];
[record setObject:[firstNameField stringValue]forKey:@"First Name"];


But there must be another way, i tried textStorage but that didn't work either, what 's going on that i don't get?


Cheers.