4 Replies Latest reply on Oct 25, 2006 5:52 PM by Newsgroup_User

    Unknown Error

    jpowerw
      Hi:
      My program is doing just what I want at this point in the process.
      However, I need a way to check for a non-text file while it's being read so I can discard it.
      The reason being, my program has about a 5 to 10% reading difficulty with the ".log" files I'm processing.
      These files come from the same program and are suppose to be text files.
      My program will read through many of them without a hitch:
      then bang, it hits a file where it does not know the CR,
      so it appends every line to the next (one long line).
      This goes on for about 15 to 20% of the file, then CRASH!
      My program crashes then Director crashes: telling me the following:

      Director has caused an error in XOBGLU16.DLL or DIRECTOR.EXE.
      These two files alternate with the error, however, I would say that XOBGLU16.DLL
      shows up much more than DIRECTOR.EXE.

      Any help much appreciated,

      Wayne
        • 1. Re: Unknown Error
          duckets Level 1

          What commands are you using to read the text file?

          • 2. Re: Unknown Error
            jpowerw Level 1

            Hi:
            Sorry about that. I am using the "mReadLine" command, which for the most part has been working well.

            Wayne
            • 3. Re: Unknown Error
              duckets Level 1
              how about just creating a new empty text member, and setting its filename to your file?

              newmem = new(#text)
              newmem.filename = the moviepath&"myfile.log"

              does that work for you?

              - ben
              • 4. Re: Unknown Error
                Level 7
                On Tue, 24 Oct 2006 19:14:55 GMT, jpowerw posted in
                macromedia.director.lingo:

                > My program will read through many of them without a hitch:
                > then bang, it hits a file where it does not know the CR,
                > so it appends every line to the next (one long line).

                If Ben's suggestion doesn't do it for you, can you expand on "it does not
                know the CR"?

                Are you sure these are non-text files or is there a chance they were saved
                with different newline characters?

                Microsoft apps typically use two chars, CR and LF while Mac and *nix
                typically use one char, LF or CR (I forget which uses which). If there's a
                chance this is what's happening, check out this Google Groups search:
                http://tinyurl.com/ybhz98

                /***/

                mReadLine isn't a method of the FileIO Xtra, so I'm wondering which Xtra
                you're using?

                Especially since, if I recall correctly, mReadLine was a method from the old
                FileIO XObject (XObjects were deprecated in Dir5 or 6 and rendered
                obsolete by Dir7). If you have any ancient XObject code in your movie, you
                could run into problems. A hint would be Lingo similar to the following
                FileIO(mNew, "read", "someFile.txt")


                --
                Mark A. Boyd
                Keep-On-Learnin' :)