<cc_item> containing value unexpectedly

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
autocart
Posts: 1422
Joined: 26 Sep 2013 15:22

<cc_item> containing value unexpectedly

Post by autocart »

Hi Don,

I made a script that I want to be able to start from outside and inside a custom column.
So I let the script check at the beginning of it whether or not <cc_item> contains a value.
I thought if it contains a value then it was started from within a custom column. If not, then it's from outside.

Now:
<cc_item> contained a value in a script outside of a custom column in this case:

When I create a new file with a template from Edit -> New Items
then <cc_item> seems to continue having the automatically given first name of the new item as value,
even if I rename it afterwards manually (!).

<cc_item> is made blank again when the list is refreshed, it seems to me.

Is this a bug? Vale, Stephan

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

Re: <cc_item> containing value unexpectedly

Post by admin »

<cc_item> should indeed always be empty unless during a script that's called from within a column.

I cannot reproduce anything else. :?

autocart
Posts: 1422
Joined: 26 Sep 2013 15:22

Re: <cc_item> containing value unexpectedly

Post by autocart »

After new testing I could not repro it again, either. Still, it behaved wrong in a simila but different way until...
... I found, that I had forgotten a semi-colon at the end of a line where I am using <cc_item>.

So it proofed true again, that the bug was in front of the screen.

Still, it is strange that without the ";" at the EOL the code worked under certain conditions and under other conditions not.
But I am glad that it seems to be ok now. I'll see.

Thx for checking, though. Regards, S.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: <cc_item> containing value unexpectedly

Post by bdeshi »

Try these steps.

::fresh;
::echo <cc_item>; // empty
CTRL+SHIFT+N. // Create new item
::echo <cc_item>; // empty
Add a custom column to the list. Any custom column.
::echo <cc_item; // empty

[ooh, the suspense...]

CTRL+SHIFT+N. // Create new item
::echo <cc_item>; // path of new item
Refresh.
::echo <cc_item>; // empty
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: <cc_item> containing value unexpectedly

Post by admin »

Bingo! :appl:

Fix comes...

autocart
Posts: 1422
Joined: 26 Sep 2013 15:22

Re: <cc_item> containing value unexpectedly

Post by autocart »

Thx Sammay, again the saviour of the day!

On a side note: Strange that
::echo <cc_item;
echos nothing for u.
For me it echos "<cc_item". :titter:
Good to see that it happens to others too, even to rocks like u.

Post Reply