I try to create my own extension with a saved AIR file. The point in doing this is that the user knows what files are created by what program and a file without an extension is just plain ugly.
When you save a file in other programs you can choose to overwrite a file (that is created before or has a known extension) or create a new file. I tried to find a way in AIR to do this same thing. I found one article on an Adobe blog that uses a FileFilter in combination with a file.browseForSave but he is using it in a way that it has no effect and is pretty useless. He is creating a FileFilter but he is never using it:
save:function(){
var fileFilter = new air.FileFilter("To Do Lists", "*.todo");
ToDo.currentDirectory.addEventListener(air.Event.SELECT, ToDo.fileSaved.bind(ToDo) );
ToDo.currentDirectory.browseForSave("Save To-do List");
}
I hear you think “who cares about the FileFilter” because it sounds like a minor problem and maybe it is. But for me it seems easy to build because browse(), browseForOpen() and browseForOpenMultiple() are using it.
I wonder if there is a way to work around this problem. It is maybe a little detail but it are the little details that make things great.
Leave a Reply to Shivanno Cancel reply