<pfaitem> items are passed one-by-one?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
admin
Site Admin
Posts: 66300
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by admin »

Sure, just as advertised:

v15.00.0119 - 2015-03-21 09:54
    * File | Open Selected Item(s): Experimentally changed the behavior of this 
      core function, i.e. what happens on pressing ENTER on selected list items.
      Before, if more than one item was selected then the items were opened one 
      after the other with each item's associated application (be it XY- or 
      OS-associated), even if all items were opened by the same application.
      Now all items are opened in one call if they are of the same type and 
      hence share the same associated application.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by bdeshi »

Erm, change it? :oops:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 66300
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by admin »

That would not make sense. Open a TXT file in Photoshop? Who would want to do that?

PS: ok, I see, your opening "application" is a script. Well, this is simply not possible. The decision single/multiple instance comes *before* the opening "application" is known. Restructuring this logic is nearly impossible without a major rewrite. Certainly not this year, sorry.

So, in the end a lot of work and nothing won. Too bad. But I still think the current new behavior is better than the old one, so it was not totally in vain.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by bdeshi »

admin wrote:The decision single/multiple instance comes *before* the opening "application" is known. Restructuring this logic is nearly impossible without a major rewrite. Certainly not this year, sorry.
separate selected files into groups based on matching PFA patterns, then call each group's PFA one-by-one?
admin wrote:But I still think the current new behavior is better than the old one, so it was not totally in vain.
true.

ed. This is a major experiment with one of the core features. More people should weigh in before this becomes permanent.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 66300
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by admin »

SammaySarkar wrote:ed. This is a major experiment with one of the core features. More people should weigh in before this becomes permanent.
Definitely!

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: <pfaitem> items are passed one-by-one?

Post by PeterH »

admin wrote:
SammaySarkar wrote:ed. This is a major experiment with one of the core features. More people should weigh in before this becomes permanent.
Definitely!
Hm - thinking about what I thought when reading about the change is the same as:
SammaySarkar wrote:separate selected files into groups based on matching PFA patterns, then call each group's PFA one-by-one?
i.e. Grouping of Matching files. Would be optimum, but also "a bit more expenses".

But in the moment all files are handled as if they were the same type: that seems a bit problematic.

binocular222
Posts: 1423
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: <pfaitem> items are passed one-by-one?

Post by binocular222 »

I would not dare to press Enter when multiple file types are selected. That doesn't make sense, even Windows Explorer would get in chaos if doing so. So I think it's fine as it's now.
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by bdeshi »

Sometimes we *want* to open multiple filetypes at once (albeit in difrnt apps): say, html+css or c+h, or sometimes just because it's speedier than opeing each file one-after-another manually. Come on, it's a basic file operation.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 66300
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by admin »

PeterH wrote:But in the moment all files are handled as if they were the same type: that seems a bit problematic.
No, not when pressing ENTER. This was not the case before the change, and it is still not the case. Nothing has changed if files of different types are selected and opened.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by bdeshi »

1. Make tweak() support "OpenAllSelectedInMultipleInstances"

2.
The new behavior is confusing.
Right now, whenever selected items trigger one PFA, it's called once, obeying the tweak=0. But whenever selected items trigger different PFAs, XY behaves as if that tweak=1 . And this change of behavior does not depend on single/multiple selection. In both case, there are multiple items selected.
So doesn't look like v this decision-making v should be effective here.
The decision single/multiple instance comes *before* the opening "application" is known.
If items of one PFA-type and nothing else are selected, XY makes a decision, and the result is to call the matching PFA once.
Now, if items of multiple PFA-types are selected, then the decision now should still be the same as before, because there's still a multiple selection, however now the result is that each PFA is called multiple times!
... ... ...
See? it's so confusing, even describing it is difficult.

[This also breaks scripts that already take care of multiple selection because they'll be called many times regardless of how they to to stop that. But not all the time either]

OpenAllSelectedInMultipleInstances=0 is a very welcome change and a fulfilled wish, only is it didn't revert back if more than one PFA are triggered. Please give a little more thought to it?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 66300
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by admin »

I read it 3 times but did not understand it.

The only thing that changed is the behavior when multiple items of the same type are selected. Then they will now all be opened in one single instance. Before the change, they were opened in multiple instances.

Where is the problem? :|

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by bdeshi »

admin (emphasis mine) wrote:The only thing that changed is the behavior when multiple items of the same type are selected. Then they will now all be opened in one single instance. Before the change, they were opened in multiple instances.
add an item of another type to the selection and try. XY will behave as before the change.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 66300
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by admin »

SammaySarkar wrote:
admin (emphasis mine) wrote:The only thing that changed is the behavior when multiple items of the same type are selected. Then they will now all be opened in one single instance. Before the change, they were opened in multiple instances.
add an item of another type to the selection and try. XY will behave as before the change.
Yes, exactly. That's what I'm saying. :?

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by bdeshi »

The only thing that changed is the behavior when multiple items of the same type are selected. Then they will now all be opened in one single instance.
but after you add an item-of-another-type to the selection, then those previously selected files-of-the-same-type which used to open in one single instance, also open multiple instances.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 66300
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: <pfaitem> items are passed one-by-one?

Post by admin »

Yes, either all together, or one-by-one.

Not many would expect anything more complex.

Post Reply