Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

getSaveFile and file extensions
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





Report this thread to moderator Post Follow-up to this message
Old Post
Nath
08-08-04 08:56 PM


Re: getSaveFile and file extensions
"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

Report this thread to moderator Post Follow-up to this message
Old Post
Slaven Rezic
08-10-04 08:57 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PerlTk archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:36 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.