ask file with filter/type - how to read the selected type ?

viktoras didziulis viktoras at ekoinf.net
Tue Jun 10 11:57:34 EDT 2008


Jacqueline, Thanks for the suggestion,

still 'the result' after execution is empty. It would probably contain 
something if path selection failed. The other 'result' (path stored in 
'it') does not always contain an extension. If user types it in, or 
chooses from a list of existing file names, then it is there. But 
otherwise if user provides file name without an extension, script has to 
check what was the file type selected, appends correct extension and 
directs output to a necessary processing handler. It knows file type 
just because it asked about it before asking for the path. Now I guess 
if I wish to avoid displaying a chain of dialogs, I have to design own 
custom askFile() function or handler. The only role of ask file with 
type or ask file with filter that is described in the dictionary seems 
to be limited to displaying existing filenames whose types match the one 
selected in the file type list...

All the best!
Viktoras

J. Landman Gay wrote:
> viktoras didziulis wrote:
>> is there any way to know what file type user selects in ask file with 
>> filter dialog ? I need to specify different handlers for file "Save 
>> as", and now am first asking user to select the type of a desired 
>> output (i.e. raw binary, ascii text, png image or ppm image) and next 
>> opening ask file dialog to get the path for saving the data. But I 
>> know "this is not good", because users are used to a single dialog 
>> for file saving where they choose save as type and the data is 
>> processed without any additional disturbances... The problem is that 
>> the selection of ask file dialog is returned in 'it' variable but the 
>> selected type of file in the dropdown list of that dialog is not 
>> returned in any readable way, or is it?..
>
> Check the result after the user selects a file. The tag is in there.
>




More information about the use-livecode mailing list