Hi,
            I append filters to the filepicker in order it to show
only the
   xml files and hide the remaining files in the open dialog. In Mac
it
   won't filter anything ( shows all the files ), but in windows it
   works. I would like to make it work on Mac.

  Please see the following code and let me know if i have to make any
further changes.
                     var fp = Components.classes["@mozilla.org/
filepicker;1"]
                              
.createInstance(Components.interfaces.nsIFilePicker);
                    fp.init(window, "Open File",
Components.interfaces.nsIFilePicker.modeOpen);
 
fp.appendFilters(Components.interfaces.nsIFilePicker.filterXML);
                    var res = fp.show();
                    if (res ==
Components.interfaces.nsIFilePicker.returnOK)
                    {
                        var thefile = fp.file;
                        ..................
                        ..................
                    }
   Please let me know if there is any workaround for this.

- Praveen

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to