Current application’s NSArray’s arrayWithArray won't compile


(Luc Naets) #1

And then I have a additional question for Shane :slight_smile: again…

When I want to add the following ASOC handler within the loaded script and it gives me an error on teh current application’s NSArray call…
But first things first :slight_smile:

on stringJoinWithDelimiter:textItemDelimiter
    tell application "System Events"
        set the CocoaArray to current application's NSArray's arrayWithArray:gS
        set the CocoaString to CocoaArray's componentsJoinedByString:textItemDelimiter
        return (CocoaString as text)
    end tell
end stringJoinWithDelimiter:

(Mark Alldritt) #2

You are using the wrong type of apostrophe character. It needs to be a vertical single quote character: '.