Menu

#63 Can't create a file from the command line if other tabs are open or other some circumstance.

1.1.2
Fixed
nobody
None
Medium
Defect
2014-02-21
2014-02-20
Anonymous
No

Originally created by: gmiso...@gmail.com
Originally owned by: tortoisesvn

What steps will reproduce the problem?
1. Ensure BP is not running.
2. Open a nonexistingfile_1.cpp in BP
3. Notice BP notes that it doesn't exist and offers to create it. So far so good.
4. Go back to the command prompt with BP still running.
5. Now open nonexistingfile_2.cpp (note the 2)
6. Notice BP says the second file does not exist, but does not offer to create it this time, and it leaves you in the first files tab.

What is the expected output? What do you see instead?
The easy but probably wrong answer is to say BP should create the second file (and any subsequent files) like it did in the first instance.

But I think this is wrong. I apologize because it highlights a problem with my original envisaging of the feature, which this defect relates to. Creating any file here is probably wrong.

Fixing the problem in the "obvious" manner suggested above would actually be fixing the wrong problem. See below.

What version of the product are you using? On what operating system?
1.1.589

Please provide any additional information below.

This is more than a simple bug, there is tension here between file new and file open and the desire or not to create a file and the added angle of the command line. Here's why:

When at the command line you may want to create a new file, OR open an existing file, OR you might make a typo (easy to do from the command line) that means whatever you intended to do, you now don't.

In use case 1, if you made a typo: you may want to continue and just do file open at this point, since you are already in the editor. Alternatively, you may want to return to the command line (if you can) and fix your typo there, since you might have typed most of the path after all or are in the right directory and you don't want to go fish for it with file open dialog box unless you have to, because it's faster not to.

In use case 2, if you didn't make a typo: but the file doesn't exist, you don't want to be thrown back to the command line because you'd just have to start bowpad again, then go File New etc.

In use case 3, you might know the file doesn't exist, but want to "create" it. But later, you changed your mind and want to exit without saving your work. If you created a file earlier but didn't save, you've just left a zero length file. That's not what you usually want. Of course, on rare occasion you might!

So what to do? When opening a file from the command line, you could ask:

"typofile.cpp" does not exist. What would you like to do? Continue | Cancel?

If you hit continue, rather than creating the file, it would probably be better to be taken to a new tab named after your filename, but not create the file. If you quit later, nothing is saved and no zero length file will exist. Save becomes enabled once you start typing and if you want a zero length file earlier, Save As is available immediately or you can type something and delete it then use regular Save.

If you hit cancel, you should return to the command line if this is where the invocation request came from, but if you can't do that, BP should leave itself where it is doing nothing.

This would seem to a) address the feature needed by the original use case of being able to start BP with a non existent file and be able to continue to work on it (or not in the event of a typo), b) fix this defect so further tabs can be created from the command line, and c)provide assistance in not creating zero length files which I hadn't fully considered as a problem first of all.

In testing this, it's important to test what Save and Save As do with command line started tabs/files and if they create/open where they should.

Thanks.

Discussion

  • Anonymous

    Anonymous - 2014-02-21

    Originally posted by: tortoisesvn

    (No comment was entered for this change.)

    Labels: Milestone-1.1.2
    Owner: tortoisesvn
    Status: Started

     
  • Anonymous

    Anonymous - 2014-02-21

    Originally posted by: tortoisesvn

    This issue was closed by revision [r596].

    Status: Fixed