I've just tested this, win2k, dMX and the text file contains the long string still. 
despite it returning the long and the short strings to the output window. Is this 
correct?


-----Original Message-----
From: Evan Adelman [mailto:[EMAIL PROTECTED]
Sent: 11 September 2003 16:15
To: [EMAIL PROTECTED]
Subject: Re: <lingo-l> [XPOST] FileIO Xtra wrapper: writeFile() solution


huh - just tested it really quickly on win2k, d8.5.1, looking at the 
file in notepad, and no go - just left the 'goodbye' in there...if i 
look at it in wordpad, same thing except now goodbye has a block in 
front of it....any ideas?

evan

Daniel Nelson wrote:

>Hello Lists,
>
>A recent thread on Lingo-l set me to thinking about overwriting files using FileIO 
>Xtra (particularly files that are longer than the string to be written).  The 
>standard solution seems to have been to delete the file before writing it again, but 
>this seems scary if one doesn't have a backup system
>built.  While walking my dogs this morning, it struck me that if the string to be 
>written were shorter than the existing file, one could simply append the EOF 
>character to that string before writing it.
>
>My newly modified FileIO Xtra wrapper class implementing this technique is available 
>from the below URL.  It must be saved first to a local hard drive, since the text 
>file will be created using "the moviePath".  It also requires BuddyAPI.
>
>Once saved, entering "test()" into the message window will print "hello world 
>gooodbye" followed by "hello world" if the test is successful.  These are the results 
>of successive writeFile()/readFile() commands and indicate that a longer file has 
>been successfully replaced by a shorter file.
>
>http://www.bluejade.com/public_resources/director/fileioxtra.html
>
>Thank you for any feedback.  I hope some of you find the wrapper useful in your own 
>work (please send me an e-mail if you do).
>
>Regards,
>
>Daniel
>
>[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 [EMAIL 
>PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
>with programming Lingo.  Thanks!]
>
>  
>

-- 



_  _  _  _  _  _  _  _  _  _  _ _  _  _  _  _  _  _  _  _  _  _  _  _  _


*m u t a n t
             m e d i a*      >     /solutions for success
//
//
/ *Evan Adelman* | 917.916.7378 | 303 E 71st St  NY NY 10021
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> | www.mutantmedia.com
<http://www.mutantmedia.com>



[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 [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]
[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 [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to