Hi there. In Python, I’m able to use bind_property() when setting up bindings between a model and widgets in a ColumnView. However I have a more complex requirement - I’m dealing with data from a database, and I don’t want to squash NULL values to the empty string ( which I have to do, because if I try to set eg a GtkEntry’s trext to None, it explodes ). I was hoping to use bind_property_full() with some GBindingTransformFunc(s), but I see that’s not supported:
File "/home/dankasak/src/gtk4-db-binder/Gtk4DbBinder/Gtk4DbBinder.py", line 855, in bind
grid_row.bind_property_full( column_name , widget , "text" , GObject.BindingFlags.SYNC_CREATE
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
, self.bind_transform_to , self.bind_transform_from , None , None )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.13/site-packages/gi/overrides/GObject.py", line 499, in _unsupported_method
raise RuntimeError('This method is currently unsupported.')
RuntimeError: This method is currently unsupported.
That’s a pity, because it would have been an elegant way to handle this. The only other solution I can think of is to duplicate each GObject property to a separate one to handle the “NULL state” of each “actual” property and have complex marshaling of values between the 2. Does anyone have any other ideas? I don’t suppose bind_property_full() is about to be supported?