Tagitems Question

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
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
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 ?
To see the attached files, you need to log into the forum.

jupe
Posts: 3570
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: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Tagitems Question

Post by admin »

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

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

Re: Tagitems Question

Post by admin »

Cannot reproduce. So, what is $base?

jupe
Posts: 3570
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)
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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