On 6/17/05 8:29 AM, "Carl West" <[EMAIL PROTECTED]> wrote: > in MX, fileIO seems to be reading text in with linefeeds instead of > returns. Did I miss something here? In 8.5 I recall it reading in with > returns. Am I delusional? I'm sure I used to be able to use line[x] on > text read-in by fileIO.
Hi Carl, Are you creating your text files on Mac OS X with TextEdit? In line with Unix applications this uses linefeed characters for new lines. Have you noticed the new FileIO method in DMX 2004: setNewlineConversion object me, integer on -- turn on/off automatic conversion of newline characters (Mac Only) I created a text file using TextEdit, with a number of new lines. I then used the following to read in the file vFileIO = xtra("fileio").new() --vFileIO.setNewLineConversion(TRUE) vFileIO.openFile(vFileIO.displayOpen(), 1) vText = vFileIO.readFile() vFileIO.closeFile() put the number of lines of vText -- 1 When I repeated the experiment with the second line of code uncommented, vText now contained the expected number of lines. Cheers, James [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]