Page 1 of 1

Custom event actions when switching between tabs

Posted: 08 Apr 2022 21:21
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

Re: Custom event actions when switching between tabs

Posted: 11 Apr 2022 09:49
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.

Re: Custom event actions when switching between tabs

Posted: 22 Apr 2022 09:37
by admin
Creating a new tab is not switching tabs.

Re: Custom event actions when switching between tabs

Posted: 24 Jun 2022 13:07
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

Re: Custom event actions when switching between tabs

Posted: 24 Jun 2022 14:00
by admin
:veryconfused: Again: Creating a new tab is not switching tabs.

Re: Custom event actions when switching between tabs

Posted: 24 Jun 2022 14:45
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.

Re: Custom event actions when switching between tabs

Posted: 24 Jun 2022 14:55
by admin
Ah, I see, yes, confirmed. I was mislead by the topic title and thought it's about the "Switch tabs" event.

Re: Custom event actions when switching between tabs

Posted: 24 Jun 2022 15:11
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.

Re: Custom event actions when switching between tabs

Posted: 24 Jun 2022 15:27
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?