Hi.
Consider the following simple action handler of my script:
on myAction_(sender)
set myText to "Wish/I/Could"
set text item delimiters to {"/"}
log text items of myText
return
end myAction_
The following will always break the text into single character list.
{“W”,“i”,“s”,“h”,“/”,“I”,“/”,“C”,“o”,“u”,“l”,“d”} — NOT what I meant.
The same very script, when run from AppleScript Editor, will correctly break the text into
{“Wish”, “I”, “Could”}
I thought maybe it’s a target problem, so i tried to
set my text item delimiters to {"/"}
and then I read something I did not quite understand about user identifiers in AppleScriptObjC, so I tried
set |text item delimiters| to {"/"}
to no avail.
I think someone in the AppleScriptObjC framework, or cocoa application “eats” my command, and for some reason, the command no longer applies to the script, or to subsequent actions like the “text items of”.
Please help… I have a rather big application that works nicely as script in AppleScript Editor, but I can’t merge it into the real cocoa application!