[comp.sys.apple2] Standard File I/O

crew@pro-harvest.cts.com (Chris Wicklein) (08/12/90)

   Can someone e-mail me some sample source code that shows how to use the
GS's Standard File I/O to return the name of a file selected by the user? I
want to use it as a generic routine to return the names of user selected files
in a utility program, so that the user won't have to type the file's name. I
use Merlin 16+
 ________________________                          _________________________
|                         ProLine: crew@pro-harvest                         |
|                    Internet: crew@pro-harvest.cts.com                     |
|                       UUCP: crash!pro-harvest!crew                        |
|                  ARPA: crash!pro-harvest!crew@nosc.mil                    |
|_______________ BITNET: crew%pro-harvest.cts.com@nosc.mil _________________|

dlyons@Apple.COM (David A. Lyons) (08/12/90)

In article <3901@crash.cts.com> crew@pro-harvest.cts.com (Chris Wicklein) writes:
>Can someone e-mail me some sample source code that shows how to use the
>GS's Standard File I/O to return the name of a file selected by the user? I
>want to use it as a generic routine to return the names of user selected files
>in a utility program, so that the user won't have to type the file's name. I
>use Merlin 16+

There should be several examples of using Standard File in the DTS Sample Code
that was recently posted to comp.binaries.apple2.

Do you have Apple IIgs Toolbox Reference Volume 3?  Read all about Standard
File in volumes 2 and 3.

The best call for you to use is probably SFGetFile2 or SFMultiGet2, depending
on whether the user is choosing *one* file or possibly a group of files.
-- 
David A. Lyons, Apple Computer, Inc.      |   DAL Systems
Apple II Developer Technical Support      |   P.O. Box 875
America Online: Dave Lyons                |   Cupertino, CA 95015-0875
GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons
   
My opinions are my own, not Apple's.

crew@pro-harvest.cts.com (Chris Wicklein) (08/15/90)

   I'm having a world of trouble using the SF tool set. When ever I try either
a _SFGetFile or _SFGetFile2 call, a dialog comes up containing ONLY the prompt
string ('Select a file: '), and the system more or less hangs. I have tried
both my own _SFGetFile call, and a _SFGetFile2 call copied right out of the
source code to PLAYER.ASM, and both have that same problem. Could
loading/initializing the tool set improperly cause it to malfunction? Would
someone please e-mail me some source that shows how to load and initialize the
SF tool set, and how to make a _SFGetFile call?
 ________________________                          _________________________
|                         ProLine: crew@pro-harvest                         |
|                    Internet: crew@pro-harvest.cts.com                     |
|                       UUCP: crash!pro-harvest!crew                        |
|                  ARPA: crash!pro-harvest!crew@nosc.mil                    |
|_______________ BITNET: crew%pro-harvest.cts.com@nosc.mil _________________|

dlyons@Apple.COM (David A. Lyons) (08/19/90)

In article <3942@crash.cts.com> crew@pro-harvest.cts.com (Chris Wicklein) writes:
>I'm having a world of trouble using the SF tool set. When ever I try either
>a _SFGetFile or _SFGetFile2 call, a dialog comes up containing ONLY the prompt
>string ('Select a file: '), and the system more or less hangs. I have tried
>both my own _SFGetFile call, and a _SFGetFile2 call copied right out of the
>source code to PLAYER.ASM, and both have that same problem. Could
>loading/initializing the tool set improperly cause it to malfunction? Would
>someone please e-mail me some source that shows how to load and initialize the
>SF tool set, and how to make a _SFGetFile call?

Have you started up all the tool sets that Standard File depends on?  The
Dialog Manager, for example?  Read the TB Ref books, and read the Apple IIgs
Technical Notes.

If you still have the problem, -you- should post (or email me) your non-
working code.  It makes more sense that way because (1) it minimizes the
time people helping you have to spend, and (2) if I dig up a sample to send
you, it will be out of context for your code anyway, even if I happen to
pick the right assembler.
-- 
David A. Lyons, Apple Computer, Inc.      |   DAL Systems
Apple II Developer Technical Support      |   P.O. Box 875
America Online: Dave Lyons                |   Cupertino, CA 95015-0875
GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons
   
My opinions are my own, not Apple's.