Page 1 of 1

Tagitems Question

Posted: 11 Jun 2019 18:34
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
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
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
Am I missing a command or switch to remove the text as well ?

Re: Tagitems Question

Posted: 11 Jun 2019 18:39
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.

Re: Tagitems Question

Posted: 11 Jun 2019 18:46
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.

Re: Tagitems Question

Posted: 11 Jun 2019 19:06
by admin
Certainly a bug. I'll look into it ASAP...

Re: Tagitems Question

Posted: 12 Jun 2019 10:09
by admin
Cannot reproduce. So, what is $base?

Re: Tagitems Question

Posted: 12 Jun 2019 10:35
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)

Re: Tagitems Question

Posted: 12 Jun 2019 10:42
by admin
Thanks, I see it now.

PS: Fixed.

Re: Tagitems Question

Posted: 12 Jun 2019 13:02
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.