Custom event actions when switching between tabs

Things you’d like to miss in the future...
Post Reply
John_C
Posts: 336
Joined: 16 May 2018 20:04

Custom event actions when switching between tabs

Post by John_C »

I have noticed two closely related issues.

Issue 1

If a custom event action is assigned on "Before (or After) browsing a folder", the script will be fired:

* each time you switch between tabs by clicking them
* each time when you close a tab
* each time when you select "Open in New Tab" from folder contex menu

but it won't be fired when you create a tab by clicking the [+] New Tab button.

Issue 2 (which is much more likely to be a bug, compared to 1)

If a custom event action is assigned on "After painting the file list", the script will be fired:

* each time you switch between tabs by clicking them
* each time when you close a tab
* each time when you select "Open in New Tab" from folder context menu (by the way, why the script is fired twice in such a case??)

but it won't be fired if you open a tab, then click the Branch View icon on the toolbar and then the [+] New Tab button.

xy 23.00.0100, win7

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Custom event actions when switching between tabs

Post by John_C »

Don, please take a look on the second issue. It happens only the first time you create a new tab after switching the current tab to the Branch View, so this definitely looks like a bug. And it breaks some very userful workflows.

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

Re: Custom event actions when switching between tabs

Post by admin »

Creating a new tab is not switching tabs.

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Custom event actions when switching between tabs

Post by John_C »

Dan, sorry for a late reply. Let me explain the second issue.

Here it is:

1. Click "Tools | Configuration | General: Custom Event Actions"
2. Assign "After painting the file list = Run script msg 'hi!';"
3. Change your current tab view to the branch view. There will be no message (and this is fine).
4. Then create a new tab, e.g. by pressing the + button or Ctrl+T. There will be no message (and I think there **should** be one).
5. And then create one another tab. The message is here (fine).

So the issue is that there is no message when you switch from branch-viewed tab to a regular tab, step 4.

tested with 23.20.0100

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

Re: Custom event actions when switching between tabs

Post by admin »

:veryconfused: Again: Creating a new tab is not switching tabs.

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Custom event actions when switching between tabs

Post by John_C »

What I mean is simply the following inconsistency:

- Case 1: switching from normal tab to another normal tab - message ✓
- Case 2: switching from normal tab to branch-view tab - message ✓
- Case 3: switching from branch-view tab to normal tab - no message, it seems the script has not be fired :-(

The case 3 is handled differently from cases 1 and 2, and because I don't see any reason for this inconsistency, I think this is a :bug:

That's it.

:ball: :ghost: :ball: :ghost: :ball: :ghost: :ball: :ghost: :ball: :ghost: :ball: :ghost: :ball:
Creating a new tab is not switching tabs.
Yes, but when we create a tab, XY automatically switches to it, right? Anyway, the difference between creating a tab and switching between tabs seems to be completely irrelevant to the issue itself. And the issue itself, as I pointed above, is inconsistency between cases 1+2 and 3.

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

Re: Custom event actions when switching between tabs

Post by admin »

Ah, I see, yes, confirmed. I was mislead by the topic title and thought it's about the "Switch tabs" event.

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Custom event actions when switching between tabs

Post by John_C »

Thanks, I'm glad to see that I helped to make XY better.

Please note that this is only the second issue from the two issues in my initial post. You may be interested to re-check the first of them as well. Here is a slightly corrected version:
# Issue 1

If a custom event action is assigned on "Before (or After) browsing a folder", the script will be fired:

* each time you switch between tabs by clicking them
* each time you "go" to another directory in the same tab
* each time you close a tab

but it won't be fired when you create a tab, e.g. by clicking the [+] New Tab button or pressing Ctrl+T.

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

Re: Custom event actions when switching between tabs

Post by admin »

While I saw the inconsistency in the prior case, this "issue #1" again reminds me of the fact that there is no actual change of location involved so why should a Changing Locations event fire at all?? Shouldn't I rather fix the inconsistency by removing the wrongly fired events?

Post Reply