Re: GtkD - how to list 0..100K strings

2020-04-29 Thread mark via Digitalmars-d-learn
Continuing this in the GtkD mailing list: https://forum.gtkd.org/groups/GtkD/thread/1370/

Re: GtkD - how to list 0..100K strings

2020-04-28 Thread mark via Digitalmars-d-learn
On Tuesday, 28 April 2020 at 18:46:18 UTC, Kagamin wrote: Try this: void populate(NameAndDescription[] namesAndDescriptions) { if(namesAndDescriptions.length>100)namesAndDescriptions=namesAndDescriptions[0..100]; innerView.viewData.populate(namesAndDescriptions); } I

Re: GtkD - how to list 0..100K strings [solved]

2020-04-28 Thread Kagamin via Digitalmars-d-learn
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(

Re: GtkD - how to list 0..100K strings: new problem

2020-04-27 Thread mark via Digitalmars-d-learn
With the new code if I have 1000s of rows I get this error: (DebFind:8087): Gdk-ERROR **: 11:50:46.787: The program 'DebFind' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAlloc (insufficient resources for operation)'. (Details: serial 8810

Re: GtkD - how to list 0..100K strings [solved]

2020-04-27 Thread mark via Digitalmars-d-learn
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; addWithVi

Re: GtkD - how to list 0..100K strings

2020-04-27 Thread mark via Digitalmars-d-learn
I've now got it to work but it is unusable! It can show small numbers of rows with no problem. However, if it has to show 100s of rows it expands the tree vertically way beyond the bottom of the screen and is impossible to navigate. However, if it has to show 1000s of rows it goes into an in

Re: GtkD - how to list 0..100K strings

2020-04-26 Thread drug via Digitalmars-d-learn
26.04.2020 11:06, mark пишет: snipped Sorry for offtopic, imho both Qt and Gtk are too complex in case of virtual list/tree view. I think the reason is they are retained mode gui. I gave up to use them for that and develop custom virtual tree view that is easy in use and currently capable t

Re: GtkD - how to list 0..100K strings

2020-04-26 Thread Mike Wey via Digitalmars-d-learn
On 26-04-2020 10:06, mark wrote: I'm trying to develop an application in GtkD. I need a widget to display a list of strings: there could be anything from 0 to 100K strings, but typically a few hundred or thousand. Using the DemoCustomList as a model I have created this code: ... When popula

GtkD - how to list 0..100K strings

2020-04-26 Thread mark via Digitalmars-d-learn
I'm trying to develop an application in GtkD. I need a widget to display a list of strings: there could be anything from 0 to 100K strings, but typically a few hundred or thousand. Using the DemoCustomList as a model I have created this code: // Note: DebNames is an AAset!string (AAset is a