On 9/8/18 2:15 PM, Russel Winder wrote:
getValueStruct
returns aGValue*
which doesn't have agType
method or function. :-(
It does have a field named gType, witch is the one you want to use.
I tried
object.getPointer
but get an exception that the contained value is not a pointer. So at the heart of my problem is what is being done with:setValue(iter, ColumnNumber.fontDescription, fontDescription);
fontDescription
is a variable of typePgFontDescription
which is a class sofontDescription
should be a reference to a heap allocated object. IssetValue
definitely going to wrap that as aValue
rather than anint
? It certainly appears not to be wrapping anObject
or aPointer
in theValue
.Apologies for seeming to drag this one out, I am not sure how to use the code to find out what is happening.
It seems that the PgFontDescription is ultimately stored as a boxed type
since:
Type.isA(PgFontDescription.getType(), GType.BOXED)
returns true.
So for now you can use:
auto font = new
PgFontDescription(cast(PangoFontDescription*)object.getBoxed());
to retrieve the Font description, and hopefully some time soon you can
use object.get!PgFontDescription()
.