Closed PhilippMDoerner closed 8 months ago
Okay not sure what this error is about, all the examples run and compile locally on my end =/
I don't understand.
The error is in my property hook:
hooks activatesDefault:
property:
let value = g_value_new(state.activatesDefault)
g_object_set_property(state.internalWidget.pointer, "activates-default", value.addr)
g_value_unset(value.addr)
The value.addr
blows up on 1.6.12 (and I assume 1.6. generally).
Meanwhile there's other hooks that do the exact same thing, e.g. ModelButton and its text property:
hooks text:
property:
var value = g_value_new(state.text)
g_object_set_property(state.internalWidget.pointer, "text", value.addr)
g_value_unset(value.addr)
I don't quite get what makes mine so different that it triggers compiler errors.
The error says owlkettle/widgets.nim(3651, 88) Error: expression has no address; maybe use 'unsafeAddr'
, so you need to use var
.
The var vs let change completely whiffed past me. Thanks! Yep that fixed it.
Looks good.
Adds password entry.
This is not the full password entry wrapped. It also has a field
menuModel
that somehow interacts with GMenu's. I started added bindings for those, but given that that is a larger task I'd like to outsource wrapping of GMenu into a different PR and do that at a different time when I'm a bit more mentally present.On its own this widget is still useful, as you can enter stuff into it, hit enter and that triggers a callback. So yay, login screens or sth.