Save As options and parameters

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

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     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu