[fa.info-mac] SFGetFile bug

info-mac@uw-beaver (01/28/85)

From: Elgin Lee <ehl@Navajo>

I thought people at info-mac would be interested in the following
message concerning SFGetFile.

------- Forwarded Message

Relay-Version: version B 2.10.2 9/18/84; site Navajo.ARPA
Posting-Version: version B 2.10.1.chuqui 4/7/84; site apple.UUCP
Path: Navajo!Glacier!decwrl!decvax!harpo!whuxlm!whuxl!houxm!ihnp4!zehntel!dual!apple!lsr
From: lsr@apple.UUCP (Larry Rosenstein)
Newsgroups: net.micro.mac
Subject: Re: SFGetFile
Message-ID: <9753@apple.UUCP>
Date: 24 Jan 85 18:34:14 GMT
Date-Received: 26 Jan 85 11:41:32 GMT
References: <watdcsu.832>
Reply-To: lsr@apple.UUCP (Larry Rosenstein)
Distribution: net
Organization: Apple Computer, Inc.
Lines: 26

In article <watdcsu.832> gross@watdcsu.UUCP (Evan Gross [Sys Des]) mentions
a bug with SFGetFile.  I talked to Tech Support and found that they know
about the problem and have a work around.

The problem is if you use a dialog hook with SFGetFile it will receive a
100 code for disk-inserted events as well as null events.  That is why 100
is continually being sent.

The workaround is for your dialog hook to call OSEventAvail with an
appropriate event mask, to see if there is a disk-inserted event in the
queue.  You can ask for all kinds of events to see if the disk-inserted is
next in the queue, or only disk-inserted to see if it is somewhere in the
queue.  I will pass along the suggested fix (send 100+drive #) to the
people in charge of such things.

The undocumented feature (the dialog hook is passed -1 when the dialog box
is put up) was also known, and should be documented in the next release of
the Package Manager manual.

Thanks for the bug report.

Larry Rosenstein
UUCP:  {dual, nsc, voder, ios}!apple!lsr
CSNET: lsr%Apple@CSNET-RELAY

"The Expandable Application: We do the programming so you don't have to."


------- End of Forwarded Message