Page 1 of 1

[solved] Toggle wall of thumbnails does not work anymore

Posted: 21 Jan 2022 11:58
by lian00
Hello, I used this script

Code: Select all

thumbsconf((thumbsconf() == '0,1,0,0') ? '1,0,4,2' : '0,1,0,0');
to toggle between my regular thumbnail view and Wall of Thumbnails but it does not work as intended since some beta versions. Second click won’t toggle back to original state. If someone can help me on this. Thanks.

Re: Toggle wall of thumbnails does not work anymore

Posted: 21 Jan 2022 12:03
by highend
Then read the changelog entry for v22.60.0214?

Re: Toggle wall of thumbnails does not work anymore

Posted: 21 Jan 2022 12:05
by lian00
highend wrote: 21 Jan 2022 12:03 Then read the changelog entry for v22.60.0214?
Thanks. I will take a look and hope I’ll understand it :oops:

Re: Toggle wall of thumbnails does not work anymore

Posted: 21 Jan 2022 12:48
by lian00
OK, thanks to @highend, I solved it adding a transparency variable. So

Code: Select all

thumbsconf((thumbsconf() == '0,1,0,5,0') ? '1,0,4,2,0' : '0,1,0,5,0');

Re: [solved] Toggle wall of thumbnails does not work anymore

Posted: 21 Jan 2022 18:14
by klownboy
Leaving out that 5th flag seems to break old scripts using SC thumbsconf which seems unusual in that Don doesn't typically change a scripting command/function in a way that breaks old code. The Help file states Leave out any values that should not be touched, but apparently if the last comma before the new transparency value is missing the code doesn't work. It's easy code to fix though.

Also Don, the Help file was updated to reflect "transparency" but it's missing in the main syntax.
thumbsconf([settings="ShowCaption,ZoomToFill,Style,Padding"], [separator=","])

Re: [solved] Toggle wall of thumbnails does not work anymore

Posted: 21 Jan 2022 18:56
by admin
Indeed, it was not my intention to break code. You can indeed omit the new argument but it's the longer return that breaks this part: ... thumbsconf() == '0,1,0,5,0' ...

tnx

Re: [solved] Toggle wall of thumbnails does not work anymore

Posted: 22 Jan 2022 19:22
by klownboy
Hey Don, did you do anything with this item on beta v22.70.0102? It wasn't mentioned, but sometimes you make a fix and don't necessary mention it. If you did, it still isn't working. If you didn't, then sorry to bring it up.

Also and more importantly, when using something simple like thumbsconf((thumbsconf() == '0,1,0,0,0') ? '1,0,0,1,0' : '0,1,0,0,0'); (Note: this has the transparency flag so it should work and it does), I notice that XY is completely redrawing the thumbnails each and every time it changes the view. It's simply going back and forth from normal thumbs to Zoom-to-Fill thumbs and it's rewriting the thumbs each cycle. I confirmed the normal and Zoom-to-Fill thumbnail cache files exist and based on the times are definitely being redrawn each time. This behavior did not happen previously. So, something else is not right.
Edit: I noticed this happening yesterday. So it was prior to today's change.

Re: [solved] Toggle wall of thumbnails does not work anymore

Posted: 23 Jan 2022 08:49
by admin
You're absolutely right. Fixed in the next beta.

Re: [solved] Toggle wall of thumbnails does not work anymore

Posted: 23 Jan 2022 12:19
by klownboy
Thanks Don, cycling between normal and zoom-to-fill thumbnails is working again when the transparency flag is used. I noticed though that if you don't use the transparency flag it still doesn't work (i.e., the change in view does not occur). For example, with thumbsconf((thumbsconf() == '0,1,0,0') ? '1,0,0,1' : '0,1,0,0'); as used in older scripts. Not a big deal, I've changed any old scripts to add the transparency flag anyway.

Re: [solved] Toggle wall of thumbnails does not work anymore

Posted: 23 Jan 2022 12:25
by admin
Yep, it was not really fixable that the return value changed its structure. Next time I will think of something smarter.

Re: [solved] Toggle wall of thumbnails does not work anymore

Posted: 23 Jan 2022 12:39
by klownboy
Thanks Don, no problem.