Page 1 of 1

<cc_item> containing value unexpectedly

Posted: 07 Sep 2016 13:48
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

Re: <cc_item> containing value unexpectedly

Posted: 08 Sep 2016 17:53
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. :?

Re: <cc_item> containing value unexpectedly

Posted: 09 Sep 2016 09:06
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.

Re: <cc_item> containing value unexpectedly

Posted: 09 Sep 2016 09:51
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

Re: <cc_item> containing value unexpectedly

Posted: 09 Sep 2016 10:12
by admin
Bingo! :appl:

Fix comes...

Re: <cc_item> containing value unexpectedly

Posted: 09 Sep 2016 12:13
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.