Scroll issue when adding to DumpContainers and using Util.ReadLine.

Options

This has been a very,very minor irritation for a long time, but I never have been able to replicate or demo it until now.

When I run this script

var list = Enumerable.Range(1,100).ToList();
Util.AutoScrollResults = true;

var dc = new DumpContainer(list).Dump();

for(int i =0 ; i < 10; i++)
{
    var newValue = Util.ReadLine<int>("Enter Value" , list.Count()+1);
    list.Add(newValue);
    dc.Refresh();
}

it dumps 100 lines and scrolls to show the last entry and correctly realises that Util.Readline takes up the last two lines of the screen. But then when I press return several more times, the last entry is not shown on screen and I need to keep scrolling down to read the details of the last line.

This happens with LP5, LP8 and LP9 , but works correctly with LP4 (4.51.03)

LP9 is not always consistent in how it behaves, sometimes it is one behind and sometimes it is three behind.

Comments

  • Thanks - this should now be fixed in 9.1.6. Updates to DumpContainer will now automatically scroll if a ReadLine is in progress.

  • Almost.
    It is fixed whilst the ReadLine is in effect, but then when it is removed the DumpContainer scrolls down but goes a little too far, meaning I only see the top of the last line.

    Screenshot at end of script.

  • That's tricky to address, because at that point, the ReadLine is no longer in effect, and so it shouldn't generally scroll as a result of a DumpContainer update.

  • Interesting,
    I managed to get a workaround by adding a dummy container and scrolling into it.

    var list = Enumerable.Range(1,100).ToList();
    Util.AutoScrollResults = true;
    
    var dc = new DumpContainer(list).Dump();
    var dummyDC = new DumpContainer().Dump();
    
    for (int i = 0; i < 10; i++)
    {
        var newValue = Util.ReadLine<int>("Enter Value" , list.Count()+1);
        list.Add(newValue);
        dc.Refresh();
        dummyDC.UpdateContent(Util.WithStyle("", "display:none"), true);
    }
    

    The last line is always visible even at the end of the script.

  • Actually the 9.1.6 update seems to have moved this problem from only affecting Util.ReadLines after using DumpContainers to more normal usage, e.g.

    Enumerable.Range(1, 100).Dump();
    Util.ReadLine("Test");
    

    Works on 9.1.5 and also 8.9.5.

  • Let me know if this is still an issue in recent updates.