Path: utzoo!attcan!uunet!unisoft!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Resource path: getting the really most recently opened file? Message-ID: <11098@hoptoad.uucp> Date: 13 Apr 90 14:41:59 GMT Organization: Eclectic Software, San Francisco Lines: 31 Here's something I thought would be easy, but I can't figure it out from disassembling the ROM. We all know about resource file search paths, and how you can use UseResFile to set which file is the first to be searched, so that any files opened after the one you specify will not be searched. Fine and dandy. But somewhere, the system must keep track of the temporarily unused part of the search path. For one thing, it needs to get back at the resource map when you UseResFile on the real most recently opened file to expand the search path back to its former state. For another, it has to be able to close all open resource files when you ExitToShell. And so on. So where is this information stored? It's not stored in TopMapHndl, at least not in any obvious way. TopMapHndl is the map currently at the start of the search path, not the file at the beginning of the total search path. And the RM code in the ROM doesn't reference any low memory globals other than the documented ones, which don't contain this information. I do realize that wherever this information is stored may change in future system versions. I'll make a decision on whether this is any better or worse than my current fallback solution, which involves searching the FCB table for all open resource files. (Hint: even if it's bad, it's probably better....) -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Satanic is merely the name they give to the behavior of those who would disrupt the orderly way in which men want to live." -- Gabrielle, THE VAMPIRE LESTAT, Anne Rice