Brett,

To answer your question, how can you apply the handler each time you 
access your external file...

Your handler is set up as a function that returns a value. So, instead of 
saying

setPref("myPref.txt", myVar)   --(from a variable), or
setPref("myPref.txt", member("myText").text)  --(from a text element), 
etc.

you simply call the handler in that spot--passing the text, inside 
parens, to the "source" argument in:

setPref("myPref.txt", CRLF2CR(myVar))   --or
setPref("myPref.txt", CRLF2CR(member("myText").text))

The handler returns the cleaned value and setPref can finish.


I'm not sure exactly what you want your handler to do. Your handler 
strips out all ASCII char 13 which is a carriage return. Similar handlers 
I've used in the past check the platform and alternately address the 
numToChar(13) and numToChar(10) which is a line feed. Your handler 
mentions that in a comment, but implies it was changed previously.

Also, if you want to add the carriage returns back in for a getPref read, 
you'll need to deal with that, at some point, too.

If none of that is an issue, you should be good to go with the above.

Rich Shupe

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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