Dragging a text file into a project

I’ll sometimes drag a text file into the navigator area of a project window. Usually it’s a help file or other large chunk of text that’s too inconveniently large to enter as a string constant.

It appears that sometimes the entire file is copied into the project, and other times only a file reference is copied. I discovered this difference a week ago when Dave S pointed out that a file was missing from a Just Code Challenge project that I’d uploaded. Normally, this wouldn’t be a problem because when I build the project, XOJO can locate the file, if it’s just a reference, and add it to the final build. But, if I intend to share the project file, I need to know whether or not to include the external text file. I went digging through the documentation, and found nothing at all about dragging any files other than image files into a project. Is there any way to know whether the item in the navigator pane is just a reference, or the actual file?

[quote=403181:@Robert Weaver]I’ll sometimes drag a text file into the navigator area of a project window. Usually it’s a help file or other large chunk of text that’s too inconveniently large to enter as a string constant.

It appears that sometimes the entire file is copied into the project, and other times only a file reference is copied. I discovered this difference a week ago when Dave S pointed out that a file was missing from a Just Code Challenge project that I’d uploaded. Normally, this wouldn’t be a problem because when I build the project, XOJO can locate the file, if it’s just a reference, and add it to the final build. But, if I intend to share the project file, I need to know whether or not to include the external text file. I went digging through the documentation, and found nothing at all about dragging any files other than image files into a project. Is there any way to know whether the item in the navigator pane is just a reference, or the actual file?[/quote]

While it is possible to add some types of files, I’ve forced myself over the years to always include a “helper files” or similar folder to every project I make. Adding files to the project itself gives little benefits over adding the folder at compile time.

What I do is that for debugbuilds I reference an absolute path in my folder structure (so compile time is faster as no copying is done) and for production builds I copy the folder whole.

I use git so the whole folder is synchronized, but even if you don’t, you can just keep the resource sin the same folder as your project and share that zipped folder.

Thanks for your comments. Considering that there’s no documentation about how XOJO deals with dropped text files, it’s probably best not to assume anything about whether the project file contains a reference or the actual data. I’ll keep the project related resources in a separate folder so that they aren’t mixed up with other things, and make sure to include the resource folder if I share the project file.