lipa@polya.Stanford.EDU (William J. Lipa) (09/08/88)
Here's a strange bug/feature I ran into recently. If your program makes use of the sublaunching feature described in one of the Tech Notes, you need to watch out for the Finder interface trap CountAppFiles. Say the user started your program by double-clicking on one of its documents. Then when the program starts up, CountAppFiles will return 1. In the usual way, you read the file and call ClrAppFile(1) to indicate that you have processed this file. Weirdly, if you later sublaunch (under UniFinder), when your program restarts CountAppFiles will still return 1 even though you cleared it with ClrAppFiles. Strange things can happen because ClrAppFiles has changed the file type to 0. Beware. Bill Lipa lipa@polya.stanford.edu