I’ve been experimenting with the FileReference class today and I got it working pretty quickly. The thing is that I’m not saving text or a picture, but my own custom class. Now I can suggest a custom extension like this:
fileref.save(MyByteArray, "New File.custom")
This works when the user clicks on save, thereby saving the class to “…\New File.custom”. However, when the user would decide to rename the file, the extension seems to be deleted too (allthough the dialog box shows “New File” instead of “New File.custom”). Vista identifies the saved file as a file with the “File” extension.
I would be okay with this, but when I use a FileFilter with ".File as the extension parameter it will filter out all the files and not show anything. So I’m thinking that the files do not have any extension at all (which I’m not okay with).
Does anybody have any idea to save a custom class with a extension? Thanks in advance.