L
L
Lici2015-02-22 02:46:22
macOS
Lici, 2015-02-22 02:46:22

How to change the content of NSTextView in Xcode?

When I need to change the contents of a text field I do:
@IBOutlet weak var TestText: NSTextField!
TestText.stringValue = "your string here";
And to find out that the parameter there is exactly "stringValue", and not Text (not Caption, Value ..), I had to google the rules.
And so I created a Text View to enter text there. And how do I know what its "content" parameter is? Similarly for all other elements - how to quickly find out what is responsible for their content?
In C++ Builder and Delphi many years ago, as far as I remember, it was all just written out on the left. You see that Caption is there - you change Caption. You see "Ololo" - you pass through "Ololo".
How about here?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-02-22
@Lici

@IBOutlet var textView: NSTextView!
textView.string = "your string here"
Intuitively, with autocomplete, what is "content"
PS Binding exactly NSTextView
cbddb97156684abaae99a1114496b3ab.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question