Friday, October 15, 2010

Delphi Tip : Avoiding Project101

It is inevitable. In my hurry to test something I created yet another console application and started entering some code. Funny thing how the project numbers keep mounting, and I have no recollection what any of these small test applications do since every default project goes into the same directory.

The solution turned out to be quite simple. Remove the WRITE access to the default project directory for my development user account. Now when I go to save, I am presented by the following dialog:



This gives me one last warning that the project doesn't yet have a home...I can now decide where to place it and what it will be called. Actually, I can't even RUN the application until it has a home...

Granted this means that there will probably be another directory with a hundred ProjectN programs... but I'll know I put them there on purpose.

3 comments:

Anonymous said...

Delphi 2007 has a "Default Project" location in the options. In conjunction with the option "Autosave|Editor Files" you will always get a save dialog open in the right place before running an newly-created application.

Anonymous said...

And I thought it was irritating to be at Project11.dpr! ;-)

SKamradt said...

@avenmore - I actually use the "default project" location, but it doesn't solve the problem. The point is to force me to put it someplace ELSE rather than a generic holding bucket for all projects. I am now more likely to save the project in a directory which by context would help me identify what it does, even if I don't rename it.