Named Filter Menu Version 2

No doubt, however, dbg is initially is set to false and I still do NOT press any key while pressing the toolbar button, and yet dbg becomes true in this line.

That's why I've asked.

Version 2.2, which is now available in the head post, shows precisely what triggered debug mode. A sample trace follows. No trace will appear if debug mode is not activated.

I have a question. I enter Filter Menu 2.2 and click on an existing filter on the left. I can see selected files mixed in with all the other files. Sometimes, when I click on Hide Unselected, I see only the files that were selected. Other times, nothing changes. Then, if I click on Edit Filter and Apply, then I see only the files selected by the filter.

I can't figure out what to do to have Hide Unselected always present only the files that were selected. TIA

From a quick test with a simple saved filter it seems to be okay. If I click the Hide Unselected button after applying the filter then unselected items are hidden. Clicking the same button a second time does nothing, but that is as expected. Clicking Show All restores the original list of items. Can you provide a repeatable example of unexpected behaviour?

  1. I may be confused on the meaning of the phrase "apply the filter."

I am thinking "apply" means simply clicking on a filter in the window listing existing filters and then clicking on the Hide Unselected button. What happens when I do this is inconsistent. Sometimes nothing happens and sometimes I see only the selected items per the filter.

I am thinking you mean by "apply"clicking on either the Advanced or the Edit Filter button, selecting an existing folder and clicking Apply. This always works in the sense I always see only the selected items per the filter. My issue with this is what is the use of the list of filters if I have to go into Advanced or Edit Filter to apply the filter.

  1. A side issue. If I create a new filter, it does not show up in the list unless I exit Filter Menu 2.2 and reenter it. Can trhis be fixed?

  2. A side issue. Although I can create a new filter within Filter Menu 2.2, I can't delete a filter from within it. Can this be fixed?

Thanks for answering me and for your attention.

A named filter is applied when it is selected in the list. If the filter doesn't match anything in the current folder then nothing will happen. Another possibility is that matching items are not visible because they are below the visible area of the current tab.

When time permits I will have a look at adding a Refresh button and a Delete button to address your side issues.

Here is an example of my problem step-by-step.

1, I enter Filter Menu 2.2 and left click on a in the list, here 7z.

1

  1. Here is the contents of the filter.

  1. I can see a .7z file selected in the Lister.

  1. I click on Hide Unselected. One of either two things happens - in a random fashion to me.

4.a. Nothing happens and the Lister screen remains the same as in item 3 above.

or

4.b. The filter is applied.

  1. I can open File Filter Menu 2.2 and first thing apply the 7z filter and 4.a. happens. Another time, I can open File Filter Menu 2.2 and first thing apply the 7z filter and 4.b. happens.

Very strange. Is the failure completely random or can you think of anything that might be different about the setup? What are your selections here:

image

If you execute filtermenu test you will be able to see what commands are being executed. You should see something similar to this. The relevant commands that are executed are highlighted. I used .js instead of .7z but otherwise our filters are identical.

My selections were the same as yours - Replace and Files. I ran "filtermenu test" and my log file for when it failed was the SAME as yours when it succeeded!

0: (do_main) timerms = 50
0: (showqualified) qualifiers = false, both = false, show = false
0: (processanchor) Start watching tab (2032908) T:\Misc
1: (do_main) control = CollName, event = editchange
1: (collcount) src = coll://filtermenu, exists = true
2: (do_main) control = CollName, event = editchange, value = filtermenu
3: (do_main) control = listbox1, event = selchange, value = 7z Files
3: (listbox1) timer1 set for 50 milliseconds, fltr = 7z Files
4: (do_main) control = timer1, event = timer
4: (processlclick) timer1 expired, fltr = 7z Files
4: (processlclick) Select "7z Files" FILTER DESELECTNOMATCH TYPE=files
5: (do_main) control = HideUnselected, label = Hide Unselected, event = click
5: Select NOPATTERN HIDEUNSEL=files

I thought maybe another script was getting in the way and turned all the others off; it still failed as before.

I'm going to let it go for awhile. Selecting Edit Filter works every time, so I'll stick with that for the time being.

I very much appreciate your attention. Thank you.