wtt writes:
> I have a text file that I would like to have displayed when the user
> selects a certain menu item. Is there something special that I need to
> do in order to reference this text file? It is included in the
> project. I looked at the OPENR description, and it seems to want to
> open files from the filesystem.
Typically, you include the text file with the save file
in the distribution of the software, then refer to it by
relating it to the location of the save file. PROGRAMROOTDIR
is useful for this purpose:
http://www.dfanning.com/programs/programrootdir.pro
In other words, suppose your save file is stored in
a directory named "coyote", and the data files are
stored in a sub-directory of coyote, named "data".
Then, the program would refer to the "data" directory
like this:
file = Filepath(Root_Dir=ProgramRootDir(), Subdir='data', $
'mydatafile.txt')
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Se****e ma de ni thui. ("Perhaps thou speakest truth.")


|