Open bluemax75 opened 1 year ago
When trying to generate the bindings for an interface with dictionary parameters:
<interface name='interfacename'> <method name='methodname'> <arg name='troubleparam' type='{ss}' direction='in'/> </method> </interface>
genbinding fails with:
/home/charly/tmp/nim/dbus/genbinding.nim(21) genbinding /home/charly/.nimble/pkgs/dbus-#HEAD/dbus/gennim.nim(75) genMethodWrapper /home/charly/.nimble/pkgs/dbus-#HEAD/dbus/gennim.nim(40) genType Error: unhandled exception: unsupported type [DbusException]
I was able to follow the problem to the genType procedure in gennim.nim It is missing the dtDictEntry value. I understand it should be added as the struct:
of dtDictEntry: return "TableRef[" & genType(kind.keyType) & ", " & genType(kind.valueType) & "]"
At least it seems to generate a reasonable output
Adding support for dicts seems useful, you are welcome to try.
When trying to generate the bindings for an interface with dictionary parameters:
genbinding fails with:
I was able to follow the problem to the genType procedure in gennim.nim It is missing the dtDictEntry value. I understand it should be added as the struct:
At least it seems to generate a reasonable output