I have a NSTextField that has text added to it from this line of code, which works fine
FFNF's setStringValue_(FileName as string)
What I am trying to do is have a return added to the end of the (FileName, so the next entered text in the text field via the above code goes below the first entered FileName, and so on down the list
I have tried applying a return like as below, this errors
FFNF's setStringValue_(FileName as string) & return
the out come would look something like this.
123456
787878
345-D
how would I go about this please?, hopefully I haven’t missed the obvious.
that has fixed the error, yet the text in the text field will not apply the return, all that happens is the text
that is already in the text field gets replaced with new text
You’re going to have to get the existing text from the field, concatenate the new text, and set the field’s contents to the result. You can’t directly add to a text field like you’re trying.
set ModText to FFNList's stringValue()
FFNList's setStringValue_(FileName) -- set the string
set GetText to FFNList's stringValue() -- get the string
set ListText to (GetText as string & return)
FFNList's setStringValue_(ListText & ModText) -- new list