I actually don't believe this happened ... but really ... it just did.
I've been working on a project of mine. It was opened via: File > Open Recent > ProjectFolderName
So some background.
There is no .proj file or whatever it is .. it's not a "TextMate Project" .. I just drag my project folder onto TextMate.
It's been open for a while, and has many folders/files inside it ... it's a mixed Java/Python project and I was shuffling some folders around via the Eclipse Navigator pane (I switch between TextMate and Eclipse, depending on wether I'm in Python or Java mode).
While I was in Eclipse, I moved my python source folder to a different directory .. did some more coding for a while and came back to TextMate.
Everything's kosher. The folders updated correctly in the TextMate's project drawer. I opened some python files .. doing some housekeeping and I decided that I'd like to add a new python file.
So I [Right Click > New File ...] on my python folder in the project drawer and enter the name for the file "utils.py" and hit Create.
The file opens up and *bang* there's a mess load of code in it. In fact, it was code from another utils.py file that is somewhere (very far away) on my HD.
Weird ... now there are two utils.py files in my project drawer. Though clicking on either one brings up the same file.
So I right-click > remove it .. quit and restart textmate and everything's ok. No utils.py file anymore, so I right-click > create it and now it's blank.
Everything's seemingly normal at the moment ... I'm not even sure I can repeat that, just wanted to send it out there.
-steve
On 4/8/2006, at 0:19, Steve Lianoglou wrote:
[...] So I [Right Click > New File ...] on my python folder in the project drawer and enter the name for the file "utils.py" and hit Create.
This sheet also has a destination folder for the file you are creating. By default it should be that of the selected folder in the project drawer, but my guess is that somehow it wasn’t (or there were multiple selections or similar in the project folder.)
The file opens up and *bang* there's a mess load of code in it. In fact, it was code from another utils.py file that is somewhere (very far away) on my HD. [...]
If the file created already exists, it does not create a new one, but just “loads” that one. So I think the problem was that the destination folder was just set to where you had the existing utils.py.
Don’t let the structure in the project drawer fool you when you manually create files from inside TM: they are always added to the selected folder, or folder with the current selected file, or root, regardless of where they were actually created on disk (will change.)