> My solution has been to add a resource of my own making to each file
that contains text, either "true" or "false". If "true", the name of
the file is displayed in italics in the listbox. If "false" it is
displayed in plain text. So all I need do is check the resource of
each file (there may be many hundreds of them) and then set the text
style of the listbox cell accordingly.
But if this is essential data, then I wouldn't consider this a very
good solution, as users who do transmit your files by ftp or try to
use them with svn or whatever will be disappointed when they break.
First, thanks to everyone who has replied. The consensus seems to be
to store a boolean at the beginning or end of the file and retrieve
it quickly. Since I want the files to be backward compatible, at the
end would make sense. One problem is going to be that my users are
able to change this setting (programatically), and so when I roll out
the new method in a version of RB that doesn't support resource
forks, I'll have no idea what that setting was, and would have to
assume all old files are set to "false". The only solution for that
is to open the file, find the byte that has the value, and read that
in. Only experimentation will tell me if that's fast enough.
FWIW, the resource fork solution has worked well for me since 1998.
Although there are theoretical issues (like loss of the resource fork
when ftp'ing), in practice they are very rarely encountered (in fact,
never encountered in my user's experience).
Thanks again.
Jon
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|