Tagitems Question

Things you’d like to miss in the future...
Post Reply
VeeGee

Tagitems Question

Post by VeeGee »

Good afternoon all,
I have a script that moves files between panes. Today I added "tagitems" to set the label to "Red" (which is in my list). This way, I see a Red square/text for the folder that I am working on. I use this to set it :

Code: Select all

tagitems(, "Red");
and it works great. I get this result :
Image-113.png
Image-113.png (5.9 KiB) Viewed 1079 times
The problem I run into, is un-setting the label. Currently I am using this :

Code: Select all

tagitems(, "None", "<path 1>\$base");
and have tried this :

Code: Select all

tagitems(, "", "<path 1>\$base");
both will remove the red color fill from the column; however, it leaves the text "Red" in the space :
Image-112.png
Image-112.png (5.01 KiB) Viewed 1079 times
Also, if I use this to update it to "Green" :

Code: Select all

tagitems(, "Green", "<path 1>\$base");
The color updates to green, but the text says "Red" :
Image-114.png
Image-114.png (5.39 KiB) Viewed 1077 times
Am I missing a command or switch to remove the text as well ?

jupe
Posts: 2758
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Tagitems Question

Post by jupe »

A refresh should work, eg: tagitems(, "None"); #485; but I'd say this may be a slight bug with your chosen label coloring style, I'll move this topic to bug reports and see what Don thinks.

VeeGee

Re: Tagitems Question

Post by VeeGee »

Thank you ! A refresh did the trick. I ended up using this :

Code: Select all

refreshlist "1";
since I am selecting/moving from Pane 2 and the labels are updating in Pane 1. Everything seems to be working now.

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

Re: Tagitems Question

Post by admin »

Certainly a bug. I'll look into it ASAP...

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

Re: Tagitems Question

Post by admin »

Cannot reproduce. So, what is $base?

jupe
Posts: 2758
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Tagitems Question

Post by jupe »

FWIW: I couldn't reproduce it exactly as shown either although if I have pane 2 active and the item visible in pane 1 that I want to tag, the tag doesn't seem to get set, but the return from tagitems() shows the old tag value correctly. It seems in his follow up post he added additional pertinent information indicating being in the 2nd pane, I think that is one of the needed conditions, I haven't thoroughly tested though.

edit: just got it to happen with full row coloring, so it isn't specific to label column coring style, main condition IMO: (setting tags with pane 2 active, pane 1 item visible)
Attachments
Clipboard-12_06_2019.png
Clipboard-12_06_2019.png (1.42 KiB) Viewed 1028 times

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

Re: Tagitems Question

Post by admin »

Thanks, I see it now.

PS: Fixed.

VeeGee

Re: Tagitems Question

Post by VeeGee »

Thank you both for your help and for the fix. I updated to the latest beta and can confirm the fix is working ! A little late, but $base was a variable that I had set :

Code: Select all

$base = gpc($item, "base");
In the future, I'll be sure to post the complete script/snippet that I am using.

Post Reply