[Solved] CC click - All entries vanish?

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
highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

[Solved] CC click - All entries vanish?

Post by highend »

Current beta.

I'm not a 100% sure if this is a bug...
If it's not, I'll move it^^

Add this CC and a column for it.
Shift + Left click one of its cells, choose "Edit modified date..."
Change the date, e.g. just the hour of it
All entries of that CC column go blank?

Code: Select all

    $curDate = filetime(<cc_item>, "m");
    $newDate = $curDate;
    if (<cc_trigger> == 5) { // Shift 4 + Left click 1
        $menu = <<<>>>
Edit modified date...|e
        >>>;
        $selected = popupmenu($menu, 6:=<crlf>, 7:="|");
        if ($selected == "e") {
            $newDate = input("Edit date", , $curDate, "e", $curDate);
            if ($newDate != $curDate) {
                timestamp "m", $newDate, <cc_item>;
            }
        }
    }
    return $newDate;
One of my scripts helped you out? Please donate via Paypal

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

Re: CC click - All entries vanish?

Post by admin »

Sounds weird. I'll look into it tomorrow.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: CC click - All entries vanish?

Post by highend »

Script a bit simplified and here is a .gif that shows the behavior.
Animation.gif
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal

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

Re: CC click - All entries vanish?

Post by admin »

The problem is recursion. The CC script calls timestamp, timestamp triggers a list refresh, the list refresh triggers the CC script, and so on. XY does not explode, it gracefully exits the recursive abyss, but the column cannot be populated.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: CC click - All entries vanish?

Post by highend »

Any way to handle this so it'll work as expected?

Even

Code: Select all

setting "AllowRecursion", 0;
doesn't change the behavior...
One of my scripts helped you out? Please donate via Paypal

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

Re: CC click - All entries vanish?

Post by admin »

You mean setting "AllowRecursion", 1;, it makes a difference but you won't like it.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: CC click - All entries vanish?

Post by highend »

Yeah, sorry, 1 != 0.

So even if we get a new command that hinders e.g. timestamp to make the refresh we'd be stuck with the old value shown, not the modified one?
One of my scripts helped you out? Please donate via Paypal

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

Re: CC click - All entries vanish?

Post by admin »

The CC column would be updated, but not the Modified column.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: CC click - All entries vanish?

Post by highend »

At least it would be better than the current situation ;)
One of my scripts helped you out? Please donate via Paypal

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

Re: CC click - All entries vanish?

Post by admin »

I tried something and it works well so far. In the next beta insert this line right before the timestamp line: setting "AllowRecursion", 2; It will allow recursion and reset the <cc_trigger> variable to zero so the flow will not re-enter the recursive part of the code.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: CC click - All entries vanish?

Post by highend »

Code: Select all

setting "AllowRecursion", 2;
fixes the issue :tup:
One of my scripts helped you out? Please donate via Paypal

Post Reply