Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: What to Remember, and When? Message-ID: <7942@hoptoad.uucp> Date: 11 Jul 89 04:38:55 GMT References: <2184@husc6.harvard.edu> <26190@agate.BERKELEY.EDU> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 36 There's one sticky bit to all this state information mess that has yet to be mentioned. If you store this information for plain text files, you will have to fake the modification date. Consider this -- you open a C source file, scroll around in it, and close it. This causes the position resource to be updated in the file's resource fork, and the modification date becomes the present. Now when that file is checked against its object code, it looks as if it's out of date and needs to be recompiled. There's a similar problem on other kinds of files, but the misleading modifcation dates are only visible to a human. Still, just opening a file and moving around in it should *not* change the apparent modification date. This is easily solved on the Mac OS by setting the mod date field in a FileParam and calling PBSetFInfo. MPW does exactly this with its state resources. But this operation may not be implemented on files on a network file system on a non-Mac OS. For instance, only the super-user can change file dates on UNIX. The server may be set up to let you do this, or not. It would be better in some ways if there were an OS call that stashed this positional information with files on request without touching the mod date, but if you think about it, that also creates some problems on remote non-Mac file systems. I don't have a solution -- I think the positional resource makes a lot of sense for other reasons, a lot more sense than an application-specific state saver. I just thought these issues should be aired. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com Postal: 424 Tehama, SF CA 94103; Phone: (415) 495-2934 "Yet another piece of evidence that it's a Communist society which is being presented as good, but which we probably would not want to live in." -- Ken Arromdee on rec.arts.startrek, on the Federation's Red Menace