Gtk Combo Box


Throwing in the towel. I am trying to make a data entry form for a MariaDB database. I designed the form in Glade and used Gtk.jl:GtkBuilder to create the form through Julia.

What I want to have a is combo box that is populated from data contained in a table. I want the box to have two columns one for the text that the user will choose and the other is the foreign key that I want stored in the database. As far as I can tell GtkComboBoxText does not allow two columns. If this is wrong, please show me how to pull that off. I don’t have an issue with getting the data to populate the combo box into Julia what I am having difficulty in doing is getting the combo box to display the data information.

What I have accomplished
I have pulled the dataset from the database using ODBC.jl to run a SELECT query and have pushed that into a ListStore. What I seem to be unable to do is get the ComboBox to display the data in order for the user to select it.

What I have tried.
I have created a GtkComboBoxText widget that I can populate with the values I want for the drop down and then run a SELECT query through ODBC.jl to get the foreign key and then store that into the database table but this seems to be the hard way to do it. There must be a more elegant way to do this through ComboBox.


This seems to work, but when I go to the ComboBox I get a list of blank lines. When I check the model using:
I get this error message:
(julia.exe:16684): GLib-GObject-WARNING **: 16:39:03.268: g_object_get_property: can’t retrieve property ‘model’ of type ‘GtkTreeModel’ as value of type ‘gchararray’
ERROR: ArgumentError: cannot convert NULL to string
[1] unsafe_string
@ .\strings\string.jl:70 [inlined]
[2] bytestring
@ ~.julia\packages\Gtk\jLULV\src\GLib\GLib.jl:48 [inlined]
[3] getindex
@ ~.julia\packages\Gtk\jLULV\src\GLib\gvalues.jl:87 [inlined]
[4] get_gtk_property(w::Gtk.GtkBinLeaf, name::String, #unused#::Type{String})
@ Gtk.GLib ~.julia\packages\Gtk\jLULV\src\GLib\gvalues.jl:168
[5] get_gtk_property(w::Gtk.GtkBinLeaf, name::Symbol, #unused#::Type{String})
@ Gtk.GLib ~.julia\packages\Gtk\jLULV\src\GLib\gvalues.jl:163
[6] top-level scope
@ REPL[70]:1

I am missing something obvious I am sure but after 3 days trying to puzzle it out, I’m asking the experts.