get("curitem"): Outdated help text?

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

: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: 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: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
autocart
Posts: 1388
Joined: 26 Sep 2013 15:22

get("curitem"): Outdated help text?

Post by autocart »

Not sure if I understand it correctly, but I think that something about get("curitem") is off.
When nothing is selected, it just returns ... nothing.
Either the help text seems off or the behaviour?
help file wrote:get() [...]

CurItem

"curitem", [part], [flags] and "curitemprev", [part], [flags]
Returns the current/previous item on whatever pane. Both take optional parameters path, file, base, and ext.
flags: (bit field)
1: Mind folders when returning "base" or "ext".
Note: get(curitem) differs from the native variable <curitem> in that it will return the previously selected and focused item if the currently focused item is not selected.
Examples:
echo get("curitem",); //E:\Test\b\c\Jane.txt
echo get("curitem", "drive"); //"E:" or "\\VEGA\Users"
[...]

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

Re: get("curitem"): Outdated help text?

Post by admin »

You're right. The text should be like this:
Note: get(curitem) differs from the native variable <curitem> in that the latter will return the previously selected and focused item if the currently focused item is not selected.

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

Re: get("curitem"): Outdated help text?

Post by jupe »

On a related topic Don, the recent changes in v28.30.0708/27.20.1403 to <cur*> resolving seems like it's going to be a breaking change in a lot of situations to me, just as one very basic example, historically scripts have had things in them like

if (<curitem>) { $f = <curitem>; } else { $f = <curpath>; }

which will now always have <curitem> resolved, but I can also think of many other ways in which previous script behavior will be unpredictably different now.

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

Re: get("curitem"): Outdated help text?

Post by autocart »

jupe wrote: 18 Jun 2026 22:22 On a related topic Don, the recent changes in v28.30.0708 to <cur*> resolving seems like it's going to be a breaking change in a lot of situations to me, just as one very basic example, historically scripts have had things in them like

if (<curitem>) { $f = <curitem>; } else { $f = <curpath>; }

which will now always have <curitem> resolved, but I can also think of many other ways in which previous script behavior will be unpredictably different now.
Agreed, I thought that I had already noticed different script behaviour myself. That said, I personally can live with the change, since I don't have that many scripts but assume that jupe is raising a valid point.

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

Re: get("curitem"): Outdated help text?

Post by admin »

Yes, it was a stupid idea. We already have <focitem>. I'll undo it in the next beta.

Post Reply