Save Dialog, Paste and the ListBox in the Window

In the main window I have a File.SaveAs Menu Handler that holds the code below:

[code] // Save the LB ListBox contents into an xml file
//

Dim dlg As New SaveAsDialog
Dim f As FolderItem
Dim tos As TextOutputStream

dlg.InitialDirectory = SpecialFolder.Documents
dlg.PromptText = “Prompt Text”
dlg.SuggestedFileName = “Suggested Filename”
dlg.Title = “Title Property”
dlg.Filter = FT_IO.TextXML
f = dlg.ShowModal()
If f = Nil Then
// user canceled
Return False
End If

tos = TextOutputStream.Create(f)
tos.Write LB.ExportToXML
tos.close
tos = Nil

// Handled !
Return True[/code]

When the dialog is open, if I want to Paste the file name, the ListBox in the window behind the dialog window takes the date. Weird.

As far as I understand, the used code comes from the documentation and I modify it as little as I could.

Ideas ?