Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: datachooser - Function Up: guiutils - Module Previous: exitchoice - Function


filechooser - Function



Package display
Module guiutils


File Chooser


Synopsis
filechooser(dirName, restrictions, title, wait, writeOK, multi, access)



Description
Provides AIPS++ with a standard file chooser. Typical use would be in one of three ways (there are lots of permuation).

filechooser()
blocks, waits around for the user to make a choice and returns the result in a glish record, guiReturns='filename'. This will likely change so that it returns only the file name.
filechooser(wait=F)
non-blocking, returns an agent. The agent signal a "returns" event when the OK button is pressed.
filechooser(multi=T)
blocks, allows multiple choices. Returns the choices in a string vector.
You may use the restrictions argument to fine tune how the filechooser presents the directories and files.
restrictions
= $ \left[\vphantom{ data=F, tables=F }\right.$data = F, tables = F$ \left.\vphantom{ data=F, tables=F }\right]$ file chooser default. Allows you to pick just files.
restrictions
= $ \left[\vphantom{ data=T, tables=T }\right.$data = T, tables = T$ \left.\vphantom{ data=T, tables=T }\right]$ data chooser default. Allows you to pick tables and files and allows the user to choose what kinds of data to be able to pick.
restrictions
= $ \left[\vphantom{ data=F, tables=T }\right.$data = F, tables = T$ \left.\vphantom{ data=F, tables=T }\right]$ table chooser default. Allows only tables to be choosen. No refinements of which tables to allowed.
restrictions
= $ \left[\vphantom{ data=T, tables=F }\right.$data = T, tables = F$ \left.\vphantom{ data=T, tables=F }\right]$ not useful.

You may use the access argument to select only those files with certain access permissions. The access argument can contain any combination of the values "r", "w", and"x".

access
="r" the default value for all choosers. Only files with 'read' permission are displayed.
access
="w". Only files with 'write' permission are displayed.
access
="x". Only files with 'execute' permission are displayed.
access
="rw". Files which are both readable and writable are displayed. Other combinations are possible.



Arguments

dirName   Directory name
    Allowed: Any directory name
    Default: Current directory
restrictions   Whether to show tables or files
    Allowed: Two element boolean record
    Default: [T,T]
title   Title to put on Window
    Allowed: Any String
    Default: AIPS++ chooser
wait   Flag for whether to wait for result or not
    Allowed: T or F
    Default: T
writeOK   Flag for allowing writing of files
    Allowed: T or F
    Default: T
multi   Flag for allowing multiple choices
    Allowed: T or F
    Default: F
access   String specifying required access permissions of files
    Allowed: any combination of r,w, and x
    Default: r


Returns
An agent or record containing the file name




next up previous contents index
Next: datachooser - Function Up: guiutils - Module Previous: exitchoice - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15