Ouch! Can't open that file...

Dan Friedman dan at clearvisiontech.com
Wed Nov 26 12:43:58 EST 2003


Tim,

Thanks for the head's up!

If all you want to do is check the existence of a file, ever think of using
"If there is a file tFilePath then" instead of "open file tFilePath for
read"?  This way you don't have to worry about changes in the engine.

Just a thought...

-Dan

 
> Hello listers!
> 
> I just got burned by a change made sometime after vers 1.1.1, and I
> thought I'd pass it along.
> 
> In some parts of my app, I use "Open File for Read" and check the result
> for "Can't open that file."...therefore determining if a file exists or
> not.  Well...somewhere a change was made from "Can't open that file." to
> "can't open that file".  Note the subtle differences...the leading char
> is now lower case (probably NOT a problem) BUT... the "." at the end is
> gone!
> 
> My workround (because I'm still straddling 1.1.1 and 2.0.3 in my
> development for EXACTLY this reason) will be to use:
> 
> if the result contains "can't open that file" then....
> 
> Hmmm...wondering what else changed...
> 
> Best Regards and Happy Thanksgiving to all from beautiful Ohio Amish
> country!
> 
> Tim Ponn



More information about the use-livecode mailing list