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
- =
data = F, tables = F
file chooser default. Allows you to
pick just files.
- restrictions
- =
data = T, tables = T
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
- =
data = F, tables = T
table chooser default. Allows only tables
to be choosen. No refinements of which tables to allowed.
- restrictions
- =
data = T, tables = F
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 |