Topic review

Author

Message

Posted

martin

2005-09-30

duerra wrote:

My personal view is that the benefits of not having to configure every extension far outweighs the minor resource implications, but I'm not the one who has to make that decision. I wonder if it's easily possible to determine if some other app has a file open via the Windows API? Filemon seems to do it well enough, but I haven't checked into the complexity of such functionality.

I would like to propose a question, though, that should be taken into consideration... how many editors out there today don't support some sort of MDI/tabbed interface for editing documents? It would seem that assuming that an app does would be correct in most instances. Maybe defaulting WinSCP to the non-MDI-style could be done only when it's determined that the editor is Notepad (I know, a hack, and I'm kidding ;) ).

My personal view is that the benefits of not having to configure every extension far outweighs the minor resource implications, but I'm not the one who has to make that decision. I wonder if it's easily possible to determine if some other app has a file open via the Windows API? Filemon seems to do it well enough, but I haven't checked into the complexity of such functionality.

martin

2005-09-27

duerra wrote:

Ok, so the problem is in determining when to delete the temporary file? It seems to me that this could be done upon close of WinSCP all the time, the same as you do for MDI/tabbed editors. It doesn't seem that there is any particular harm in that, but I can't say that for certain.

Not when only to delete the file. That also means the WinSCP would have to watch for changes for every single file you have ever edited in current session. To me that means unacceptable wasting of system resources.

duerra

2005-09-26 19:19

Ok, so the problem is in determining when to delete the temporary file? It seems to me that this could be done upon close of WinSCP all the time, the same as you do for MDI/tabbed editors. It doesn't seem that there is any particular harm in that, but I can't say that for certain.

And often the "Edit" value is empty, yes. If it is empty, that's when the default would be used (described in my first post). If the default doesn't exist, then use the built-in by default, perhaps? Or a default specified by the user in WinSCP?

It just seems like a bit much on the maintenance to have to set up WinSCP for all these editors when system configurations may change, or when showing co-workers how to use WinSCP, etc. It's just one less thing for new adopters to have to worry about/figure out.

martin

Re: Default Editor

2005-09-12

duerra wrote:

I have thought about it already. However I do not think that the "edit" value use to be filled, does it?.

What do you mean? I'm not following you...[/quote]
I've meant that in most cases the "edit" field in the registry is empty (or not present). Only the "open" field is usually filled in.

Correct me if I am wrong, but WinSCP only uses the MDI/tabbed checkbox to determine if the process has actually started/exited, correct? If you are using the same keys that Explorer uses, you are no longer requiring the user to make this edit in WinSCP, and it can be fairly reliably assumed that the entry is correct and that the process will reliably start, making the check less necessary (any problems with that entry are a larger problem in the OS and should be something that you really need not be too concerned about).

Re: Default Editor

The value of that key will tell you the value of the "Edit" command from Windows explorer's perspective.

I have thought about it already. However I do not think that the "edit" value use to be filled, does it?.

What do you mean? I'm not following you...

martin wrote:

From here there shouldn't really be any need to know if an editor is MDI/tabbed, and it should allow WinSCP to work well without separate configuration (and allow it to dynamically update with Windows as necessary).

Why do you think so?

Correct me if I am wrong, but WinSCP only uses the MDI/tabbed checkbox to determine if the process has actually started/exited, correct? If you are using the same keys that Explorer uses, you are no longer requiring the user to make this edit in WinSCP, and it can be fairly reliably assumed that the entry is correct and that the process will reliably start, making the check less necessary (any problems with that entry are a larger problem in the OS and should be something that you really need not be too concerned about).

martin

Re: Default Editor

2005-09-07

duerra wrote:

That value (default) will tell you what file <type> it is.

Then look in HKEY_CLASSES_ROOT/<type>/shell/Edit/command

The value of that key will tell you the value of the "Edit" command from Windows explorer's perspective.

I have thought about it already. However I do not think that the "edit" value use to be filled, does it?.

From here there shouldn't really be any need to know if an editor is MDI/tabbed, and it should allow WinSCP to work well without separate configuration (and allow it to dynamically update with Windows as necessary).

Why do you think so?

duerra

Default Editor

2005-09-06 22:10

Martin,
It would be nice if WinSCP could, by default, use the default Editor for a particular file type without further configuration.

To determine the default editor for a file type, look in HKEY_CLASSES_ROOT/.<extension>

That value (default) will tell you what file <type> it is.

Then look in HKEY_CLASSES_ROOT/<type>/shell/Edit/command

The value of that key will tell you the value of the "Edit" command from Windows explorer's perspective.

A default can be set for all file types, too, so if the file type searched for was non-existent, use the value of HKEY_CLASSES_ROOT/*/shell/Edit/command

From here there shouldn't really be any need to know if an editor is MDI/tabbed, and it should allow WinSCP to work well without separate configuration (and allow it to dynamically update with Windows as necessary).

I hope this helps. As always, WinSCP is an unbelievably fantastic app. Your efforts are highly appreciated by a very large number of people.