Setting contents of text view

OK how come Set contents of text field “MyTextField” of window “MyWindow” to myString works but set contents of text view “MyTextField” of window “MyWindow” to myString doesn’t work?

I get NSRecieverEvaluationScriptError: 4 (1)

My text field wasn’t becoming scrollable when it had enough text to be scrollable even though I had the “Scrollable” check box checked in the inspector window so I changed it to a scrollable text view element.

How do you set the contents of a text view?

Remember, that text views are contained within a scroll view. Also, it’s not a good idea to set or get the “contents” of a text view when changing it’s string value. Instead, use “content”. So…

set content of text view "someTextView" of scroll view "someScrollView" of window "someWindow" to myString

j

Interesting. I don’t suppose you could explain what the difference is between “Contents” and “Content”?

Check out the documentation for text views (under Version Notes):

Ah Yes, I see… Said the blind man yada yada yada

Thanx. :slight_smile: