Re: Save As options and parameters

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Antonio,
    The filetypes must append by your program, a common save dialog 
can't do this. (Windows API don't know about which file are u editing)
    The only reason for those file types being there is that because its 
likely that you'll want to save a file with that extention and if it 
exists it's easier to see it and just click on it to get it's name.

Best Regards,
    Guillermo Bonvehi

Guest wrote:

>
>
>posted by: a.admin at myway.it
>
>In several demo programs I find the 'Save As' instruction. Let's take the
>
>.\Win32lib-59-1\Demo\GENERIC editor.EXW
>
>-- 07/Sep/2000 Wolfgang Fritz
>--------------------------------------------------------------------
>-- This demo shows off a lot of the features of Win32Lib, including:
>--
>-- Menus
>-- File Open/Save/SaveAs dialogs
>
>
>constant FileTypes = {
>    "dialog flags", {OFN_ALLOWMULTISELECT},
>    "Text File", "*.TXT",
>    "Euphoria Program", "*.EX;*.EXW;*.E;*.EW",
>    "All Files", "*.*" }
>
>and then    
> 
>    fName = getSaveFileName( Generic, openFileName, FileTypes )
>    
>    if length(fName) = 0 then
>        return
>    end if    
>    
>    -- save the file
>    saveFile( fName )
>    
>    
>The question is to what do they serve all these defined FileTypes, since
>'fName' will not include any of them, even if choosed?
>
>I mean, if I select "Euphoria Program", I expect one of the
>"*.EX;*.EXW;*.E;*.EW" be appended to the typed name, exactly as every Windows
>program naturally does.
>
>As is, this option is a booby-trap, 'cause it creates for more the illusion...
>Is there a way to get the selected file_type, in order to add it before saving
>?
>
>Thanks to everyone.
>    
>Antonio Alessi
>  
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu