title: error number -1708 While splitting a string
body: <p>I have the following function that does string splitting:</p>
  
  <pre><code>on splitText(aString, delimiter)
      set retVal to {}
      set prevDelimiter to AppleScript's text item delimiters
      set AppleScript's text item delimiters to {delimiter}
      set retVal to every text item of aString
      set AppleScript's text item delimiters to prevDelimiter
      return retVal
  end splitText
  </code></pre>
  
  <p>When used by itself, it works ok</p>
  
  <p>log splitText("http://google.com|/Users/pistacchio/Desktop/google.jpg", "|")</p>
  
  <p>But when I use it within the context I need, I get a <code>-1708</code> error</p>
  
  <pre><code>tell application "Safari"
      activate
      repeat with row in linesToPrint
          log splitText("http://google.com|/Users/pistacchio/Desktop/google.jpg", "|")
      end repeat
  end tell
  </code></pre>
  
  <p><code>linesToPrint</code> is an array of strings</p>
  
  <p>Any help?</p>