Page 1 of 1

Combox gtk_entry_set_text: assertion 'text != NULL'

Posted: Mon Nov 09, 2015 5:19 pm
by wichtel
Hi,
I have started to port some programs from Windows to Linux.
I got stuck right away with an editable combobox.
The code below works in Windows.
If an item in the combobox is selected, it gets displayed.
On Linux I get [WARNING] Gtk (CRITICAL): gtk_entry_set_text: assertion 'text != NULL' failed

Is that a bug? Should it work? Or is there a workaround?

Thanks

Code: Select all

Procedure Window(x = 0, y = 0, width = 300, height = 200)
  Window_0 = OpenWindow(#PB_Any, x, y, width, height, "", #PB_Window_SystemMenu)
  Combo_0 = ComboBoxGadget(#PB_Any, 10, 10, 200, 20, #PB_ComboBox_Editable)
  AddGadgetItem(Combo_0, -1, "bla1")
  AddGadgetItem(Combo_0, -1, "bla2")
  AddGadgetItem(Combo_0, -1, "bla3")
  AddGadgetItem(Combo_0, -1, "bla4")
EndProcedure

Procedure Events()
  Repeat
    EventID = WaitWindowEvent()    
  Until EventID=#PB_Event_CloseWindow
EndProcedure

Window()
Events()


Re: Combox gtk_entry_set_text: assertion 'text != NULL'

Posted: Mon Nov 09, 2015 6:35 pm
by Oma
Hi wichtel,

confirmed on PB5.40 and PB5.31 with gtk3. It works on gtk2.
It should be posted in Linux-Bugs.

Regards, Charly

Re: Combox gtk_entry_set_text: assertion 'text != NULL'

Posted: Mon Nov 09, 2015 6:58 pm
by wichtel
Thank you.
I wonder as libgtk-3-dev was part of the install prerequisites.