•  Back 
  •  GEM User Interface Guidelines 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File
                              The File Selector


Several important style guidelines are important to follow when using
the system calls fsel_input() or fsel_exinput() to provide the common
system file selector to the user. If your application provides a custom
file selector unique to your application, always allow the user the
choice of using the system file selector as opposed to your own. In
general, it is better to use the internal selector rather than provide
a customized one. The user may install a third-party file selector
replacement if they want the extra features that custom file selectors
usually provide. This provides more user-interface consistency
throughout the system.

If you commonly use a third-party replacement file selector on the
system you test applications on, always test your application with the
replacement file selector disabled. Several third-party file selectors
handle screen redraws and pathname parsing differently than the
internal file selector does.

When your application needs to display the file selector, always
ensure that the pathname that is going to be passed to the file
selector call is valid. If the pathname becomes invalid, revert to
a system default path such as that of your applications own. It is also
courteous to the user to store the last used path in a global buffer so
that each time the file selector is accessed the user doesn't have to
change directories again.

If your application requires that its files be loaded and saved with
a specific file extension, append that file mask to the end of the
pathname so that the user's choices are restricted. If during a save
operation the user chooses to override your default extension, either
allow it or prompt the user as to their true intention.

When the file selector call returns, if the filename field is blank,
treat it as a 'Cancel'. If a filename was entered but it contains no
file extension, append your default file extension (if appropriate) to
it.