Hi… I created a window in IB with a text view that I labeled “Texttest”
According to apple’s documentation, this should work:
tell text view "Texttest" of scroll view "Texttest" of window "main"
set text color to {0, 65535, 0}
end tell
set contents of text view "Texttest" of scroll view "Texttest" of window "main" to "Hello this is a test"
yet I get an error every time… I actually can’t see anything about “scroll view” anywhere… so I never actually labelled scroll view… Is that my problem?
set fontDone to {"Arial Black", 28}
set positionOfWord to 23
set excerciseTextView to text view 1 of scroll view 1 of window 1
call method "setFont:" of (exerciseTextView's word positionOfWord) with parameter (call method "fontWithName:size:" of class "NSFont" with parameters fontDone)
also try content in place of contents
sometimes that “s” is the cause of on error (even if the documentation states to use it)
Thanks Bruce, I missed that part.
Appears to me that in an Xcode project we are calling sub-handlers from event handlers which places the sub “in the event handler”. I’ll keep that in mind.