Displaying Category X does not show files inside collapsed stacks(nor count them

Started by ubacher, December 09, 2013, 04:48:31 AM

Previous topic - Next topic

ubacher

If I display CATEGORY X and I have a collapsed stack where all files in it carry Category X then Imatch will only show
me the top of the stack. Makes sense once you think about it. But what is confusing is that the count shown
does not include the files hidden in the stack even though they have the category X. Should the count not also include the files hidden
inside the stack?

This behavior also adds complications inside a script.  To get all files it seems I have to scan for collapsed stacks and expand them
and then select the category again.

Maybe it would make sense to have another parameter on Database.Categories("X")  named "Also Inside Stacks".

Or would it be better to have Also Inside Stacks the default and an option to turn this off?

Mario

I have a category with 8 files, in two stacks of four files each.

The stacks are collapsed. I see only the two top files in the file window.

1) The file count in the Category View (behind the category name) shows 8 files. Correct.
2) The file window caption bar shows 2 files. Correct.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

The difficulty I see is that one needs to compare the two numbers to be aware that there are
files hidden. I am sure overlooking this will cause grief to many users.

Similar with the scripting. Some way needed to indicate that not all files have been returned.

Mario

The key idea of stacking is to hide files from the file window.
Scripting provides methods which tell you if a file is stacked, is a stop or part of a stack (See IMStack class).

If the possibility of stacked files being processed by your script may affect the outcome of the script, you can use the above class to check whether the files you are processing are stacked, in which stack, are top, whether the stack is collapsed etc.

This gives your scripts the possibility to work like the file window (only process selected files), or additionally process stacked files as well. The IMatch scripting model supports both approaches.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

I am wrong: In scripting all files for the selected category are returned regardless of stack membership.
Sorry about that.

Mario

Quote from: ubacher on December 09, 2013, 02:52:17 PM
I am wrong: In scripting all files for the selected category are returned regardless of stack membership.

Of course. Categories don't know anything about stacks. The same is true for folders, time line nodes, collections etc.
Stacks are a concept mostly used by File Windows, to show/hide files.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook