Path: utzoo!news-server.csri.toronto.edu!rpi!usc!apple!well!gurgle From: gurgle@well.sf.ca.us (Pete Gontier) Newsgroups: comp.sys.mac.programmer Subject: Re: File Icon location in the Finder Keywords: AppleTalk Message-ID: <23663@well.sf.ca.us> Date: 18 Mar 91 06:20:14 GMT References: <2859@sparko.gwu.edu> <1991Mar15.145457.278@bmers95.bnr.ca> Organization: cellular Lines: 31 In article <1991Mar15.145457.278@bmers95.bnr.ca> slang@bmerh563.bnr.ca (Steven Langlois) writes: >I seem to be unable to control the location of a file icon. In particular >when I am overwritting a file, I call FSDelete to delete the file and >FSCreate to create a new file with the same name. Before I delete the >file with FSDelete, I save the location of the icon using >location := paramBlock.ioFlFndrInfo.fdLocation. After I recreate the >file In my experience with MultiFinder, I have found that most of the Finder information can be dependably written only by, you guessed it, the Finder. It's got its own internal representation of how things should look, and only under certain circumstances does it actually go out and take a look at the file system to refresh its memory. To see if you are suffering from this problem, you could try running your program under UniFinder. I have two ideas for solutions: 1) Set the modification date when you set the icon position. If that doesn't work, set the modification date of the parent directory after setting the icon position. This may give the Finder the swift kick in the pants it needs. But this sounds like an awful lot of work. 2) Don't delete the old file and create a new one. Just open the old file and SetEOF it to 0. Same effect, roughly. -- Pete Gontier, gurgle@well.sf.ca.us Software Imagineer, Kiwi Software, Inc.