Bernard Bel wrote on 11/27/06 8:11 AM:
>> I think the current stategy will still work, but a better way (on OS X or OS
>> 9) might be to use the Alias Manager since under many circumstances it can
>> track files that have been moved or renamed.
>
> It is already using aliases. The idea was that a user might want to
> store all grammars in a specific directory, alphabets in another
> directory, etc. Then, to make a project, create a new directory and put
> there the aliases of the grammar, alphabet etc.
I actually did not mean Finder aliases. The Alias Manager allows you to
create alias records in memory which can then be saved in the resource fork
(or data fork, I suppose) of any file. A script file could save an alias
record for every file that it opens rather than saving the volume reference
number and parent folder ID. This is safer even when files do not move
because vRefNums are unreliable. (They can change on reboot). This method
also has the added benefit of using the full power of the Alias Manager to
find files that have moved or have been renamed. (And it sometimes works
after transferring files to another computer).
I do see the call to ResolveAliasFile() in BP2, but I am suggesting that we
use NewAlias() and ResolveAlias() instead for file references in scripts.
(This can of course be dealt with in the second stage of development).
Anthony Kozar
anthonykozar AT sbcglobal DOT net
|