On Monday, 27 April 2020 at 10:28:04 UTC, mark wrote:
I renamed the class shown in my previous post from View to InnerView, then created a new View class:

class View : ScrolledWindow {
    import qtrac.debfind.modelutil: NameAndDescription;

    InnerView innerView;

    this() {
        super();
        innerView = new InnerView;
        addWithViewport(innerView);
    }

    void clear() {
        innerView.viewData.clear;
    }

    void populate(NameAndDescription[] namesAndDescriptions) {
        innerView.viewData.populate(namesAndDescriptions);
    }
}

Try this:

    void populate(NameAndDescription[] namesAndDescriptions) {
if(namesAndDescriptions.length>100)namesAndDescriptions=namesAndDescriptions[0..100];
        innerView.viewData.populate(namesAndDescriptions);
    }

Reply via email to