I am trying to pop up a file dialog box after clicking on a button for an Action.
this code is not working
please advise.
[code] Dim dlg as OpenDialog
Dim f as FolderItem
Dim DatType As FileType
'DatType.Name = “text/dat”
'DatType.MacType = “TXT”
'DatType.MacCreator = “prvw”
DatType.Extensions = “dat”
dlg=New OpenDialog
#If Not (TargetLinux) then
dlg.InitialDirectory=SpecialFolder.Documents
#Else //open Home directory on linux
dlg.InitialDirectory=SpecialFolder.Home
#endif
dlg.Title=“Select a MIF file”
dlg.Filter=DatType.Extensions //Defined as file type in FileTypes1.
f=dlg.ShowModal()
If f <> Nil then
//proceed normally
Else
//User Cancelled
End if[/code]