Page 1 of 1

Passive selection via a script

Posted: 01 Nov 2008 03:43
by ivan
This could well be a feature and not a bug, but having thought about it I couldn't think of a reason why it would be a feature so here goes...

To reproduce:
1. Navigate to any folder with some files in it and make sure that the focus is on the folder (name of the folder is in a blue rectangle).
2. Assign a KS to this script:

Code: Select all

Selfilter *.EXT, f;
where "EXT" is an extension of any file(s) that you have in a folder you navigated to
3. Hit that KS

The selection of the file(s) with that extension will be made passively so it/they will be highlighted in grey boxes and the active focus will remain on the folder itself. This means that if you, for example, pressed the "Delete" button then it would apply to the folder and not the selected files.

The way my logic of how this should have worked is that if you apply a selection command then it's much better if those files are actively selected so you can apply additional commands as part of a script or so you can manually transfer them somewhere or do whatever you please. In other words, I don't understand why, when calling a selection command, the focus from the folder isn't transferred to the selected items automatically. After all, if you wish to select certain files then it could only be for the sole purpose of doing something with them.

Re: Passive selection via a script

Posted: 01 Nov 2008 05:19
by serendipity
ivan wrote:...
The selection of the file(s) with that extension will be made passively so it/they will be highlighted in grey boxes and the active focus will remain on the folder itself. This means that if you, for example, pressed the "Delete" button then it would apply to the folder and not the selected files.
...
Not true, if you press delete on a focused but unselected item, then nothing will happen. To delete anything it has to be selected.

Re: Passive selection via a script

Posted: 01 Nov 2008 11:26
by jacky
serendipity wrote:
ivan wrote:...
The selection of the file(s) with that extension will be made passively so it/they will be highlighted in grey boxes and the active focus will remain on the folder itself. This means that if you, for example, pressed the "Delete" button then it would apply to the folder and not the selected files.
...
Not true, if you press delete on a focused but unselected item, then nothing will happen. To delete anything it has to be selected.
hmm, no. If you have one item (say a folder) focus and other(s) (say some files) selected and hit Delete, you'll delete the selected items of course.

Obviously though, that's only true if focus is on List. And it sounds to me, ivan, your focus must be on Tree, and thus hitting Delete means deleting the current folder. That's the normal/expected behavior of XY.

Try adding "focus l;" in your script and that should do it.

Re: Passive selection via a script

Posted: 01 Nov 2008 13:39
by ivan
jacky wrote:Obviously though, that's only true if focus is on List. And it sounds to me, ivan, your focus must be on Tree, and thus hitting Delete means deleting the current folder. That's the normal/expected behavior of XY.

Try adding "focus l;" in your script and that should do it.
Thank you, adding that line to the script has shifted the focus from folder to list of files. Still, though, why it wouldn't happen intuitively escapes me.