Saving a tab formatted field to a file and retaining its formatting

dunbarxx dunbarx at aol.com
Mon Apr 8 09:25:41 EDT 2019


Hi.

I am always missing something. Why is there an issue retaining tabs in a
body of ordinary text?

I have a table field with "A" & tab & "B" & tab & "C" in it. If I write that
text into a file on my desktop and then load it back into the second line of
that field:

on mouseUp
   get fld 1
   
   open file  "/users/craignewman/desktop/xxx" for text write
   write it to file  "/users/craignewman/desktop/xxx"
   close file "/users/craignewman/desktop/xxx"
   
   open file  "/users/craignewman/desktop/xxx" for read
   read from file  "/users/craignewman/desktop/xxx" until EOF
   close file  "/users/craignewman/desktop/xxx"
   
   put it into line 2 of fld 1
end mouseUp

The identical text is now in line 2, all tabs intact. No rtf stuff needed.

I am always missing something.

Craig Newman



--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html




More information about the use-livecode mailing list