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
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
Document.CreationDate = DateCr
DateMod = New date
Document.ModificationDate = DateMod
But still getting the new creation date and time.
Any other suggestions?
Thanks.
Lennox.
Sven E Olsson <[EMAIL PROTECTED]> wrote:
On 2007-04-07, at 23:02, Lennox Jacob wrote:
> 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
BUT the new file is not Saved yet.
>
> 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
Now when the new File is created
Document.CreationDate = OldCreationdate
// A note I see, you give the documentFolder (document) = f before
you are sure that all goes well..
// If it fails you have a document with TexthasChanged = fails and a
folderitem that is NIL..
// Give your document the folderitem when you are sure that all works
well
> End if
>
> But same thing happens.
>
> Kindly advise.
>
> Thanks.
>
> Lennox
>
Sven E
---------------------------------
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>