but if I change and insert a word and close the window it ask me if I want save the file
I press ok and it ask me if "Do you want to overwrite it"
I press ok
when I reopen the file I cannot see nothing with testrtf.exe
because it save as text
if I open the file with windows notepad I can see the file as text and I saw it lose the format rtf
why ?
perhaps the METHOD SaveToFile is wrong ?
- Code: Select all Expand view
- METHOD SaveToFile( cFileName ) CLASS TRichEdit
DEFAULT cFileName := ::cFileName
if Empty( cFileName )
MsgAlert( "No filename provided to save the richedit text" )
return nil
endif
if File( cFileName )
if MsgYesNo( cFileName + " already exists" + CRLF + ;
"Do you want to overwrite it ?" )
MemoWrit( cFileName, ::GetText() )
endif
else
MemoWrit( cFileName, ::GetText() )
endif
return nil