Code Comments
Programming Forum and web based access to our favorite programming groups.When i use getSaveFile i want to be able to do the following (any pointers welcomed!): select the Save As Type (to display all files of that type - with more than 1 file extension: e.g. *.fas;*.fasta;*.aa;*.nt etc) Type the name of the file to save, without an extension, and to append a default extension based of the currently selected Save As Type. example. I have 2 diferent file types: Fasta Type: *.fas;*.fasta;*.aa;*.nt Phylip Type: *.phy;*.phly;*.phylip I want to save the file as a phylip type, so i select the 'Phylip Type' in the Save As Type drop-down list. This shows me all the phylip type files with the above extensions. I type the name of the file i want to save: example_file_name Click save, and the default 'Phylip Type' extension (i.e. the first extention in the filetype list '.phy' ) is appended to the returned file path from getSaveFile. Thanks Nathan
Post Follow-up to this message"Nath" <DON'T_SEND_ME@TRIPE_TO_MY_IN.BOX> wrote in message news:<411639d8$0$5110$afc38c87@n ews.ukonline.co.uk>... > When i use getSaveFile i want to be able to do the following (any pointers > welcomed!): > > select the Save As Type (to display all files of that type - with more tha n > 1 file extension: e.g. *.fas;*.fasta;*.aa;*.nt etc) > Type the name of the file to save, without an extension, and to append a > default extension based of the currently selected Save As Type. > > example. > > I have 2 diferent file types: > Fasta Type: *.fas;*.fasta;*.aa;*.nt > Phylip Type: *.phy;*.phly;*.phylip > > I want to save the file as a phylip type, so i select the 'Phylip Type' in > the Save As Type drop-down list. This shows me all the phylip type files > with the above extensions. > I type the name of the file i want to save: example_file_name > Click save, and the default 'Phylip Type' extension (i.e. the first > extention in the filetype list '.phy' ) is appended to the returned file > path from getSaveFile. Maybe subclassing Tk::FBox can help here (assuming you're on X11). In VerifyFileName the filename is constructed by using the value of the -defaultextension option. Now you could wrap this method and change -defaultextension before calling the "real" method. Regards, Slaven
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.