Thanks Sven,
Did this:
Dim f as FolderItem
Dim DateCr, DateMod as date
If Document = Nil or DisplaySaveDialog then
#If TargetWin32 //if on windows
f=GetSaveFolderItem("rtf",FileName) //use rtf fle type
#else //on Linux or Macintosh
f=GetSaveFolderItem("text",FileName)
#endif
If f.exists then
DateCr = f.CreationDate
f.CreationDate = DateCr
DateMod = New date
f.ModificationDate = DateMod
end if
If f<>Nil then //if the user clicked Save
Title=f.Name //window Title gets the name of the document
Document=f //window property gets the folderitem
End if
End if
If Document<>Nil then
Document.SaveStyledEditField TextField
TextHasChanged=False
End if
But same thing happens.
Kindly advise.
Thanks.
Lennox
Sven E Olsson <[EMAIL PROTECTED]> wrote:
On 2007-04-07, at 22:24, Lennox Jacob wrote:
> Hello,
>
> I was going through the REALbasic Tutorial (TextEditor-ch9.rbp)
> again and I noticed that when a file is created and then modified,
> both the Creation and Modification Dates and Times are always
> updated to the date and time of saving.
>
> If the file is closed then reopened and modified, again the
> Creation and Modification Dates and Times are the date and time of
> saving.
>
> How can that be corrected so that the Creation date and time
> remains unchanged whilst the Modification date and time of saving
> be updated?
>
> Thanks.
>
> Lennox
>
something like this
if File Exists then
read old date to a variable
write new file
newfile.CreationDate = olddate
end if
(check the LR folderitems about date and time stamps on files)
Sven E
_______________________________________________
Unsubscribe or switch delivery mode:
Search the archives:
---------------------------------
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>