This is something that can use some improvement within GtkD, The linked
list contains pointers to the C struct a GtkTextTag* and not a D class.To fix the example code change line 62 from:
tta[i] = *(cast(TextTag*) sll.data);
to:
tta[i] = new TextTag(cast(GtkTextTag*) sll.data);
As for the bast way to improve GtkD in this respect, i will probably add
something like "getTagArray" to TextIter, and ditto for similar
functions. What do you think?
Ah, all is clear now. getTagArray is a nice idea, but if you do it here then you might end up having to do similar things everywhere. Would it be feasible to provide an opAssign from GtkTextTag*. Then people could write even more naive code like
tta[i] = sll.data;
and get the result they wanted? But you'd have to do that everywhere as well ;=(
Thank you for your excellent assistance Mike.