Gtk (CRITICAL) ERRORS ???
Posted: Thu Mar 17, 2022 11:02 am
Hi,
The source below is a small sample which works well, but is very comparable to my bigger one which does get errors.
Can anyone tell me what can be the reason for those errors or how to solve this ?
Point is creating a complete gadget setup at runtime.
Thanks
This is the part on which the errors occur, as they were selected for creating the gadgets, in the bigger complete source. But I don't know why.
The source below is a small sample which works well, but is very comparable to my bigger one which does get errors.
Can anyone tell me what can be the reason for those errors or how to solve this ?
Point is creating a complete gadget setup at runtime.
Thanks
Code: Select all
Global.i Window_0,Canvas_0, btn1, a, b,x,y,w,h
Window_0 = OpenWindow(#PB_Any, #PB_Ignore, #PB_Ignore, 500,500, "test ", #PB_Window_SystemMenu |#PB_Window_ScreenCentered |#PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget)
Canvas_0 = CanvasGadget(#PB_Any,0, 0, 500,500, #PB_Canvas_Keyboard | #PB_Canvas_Container)
btn1=ButtonGadget(#PB_Any, 430,10, 50,20, "testing")
For a=0 To 5
ButtonGadget(#PB_Any, 10,10 + (a*25), 40,20, "testing")
Next a
x=80
y=10
w=40
h=20
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
End
ElseIf EventID = #PB_Event_Gadget
If EventGadget()=btn1
For a=0 To 5
ButtonGadget(#PB_Any, x+b,y + (a*25),w,h, "testing",#PB_Button_Right)
Next
b+70
EndIf
EndIf
ForEver Code: Select all
Select \type
(Line: 1194) => Case #PB_GadgetType_Button : \idx = ButtonGadget(#PB_Any, \x,\y,\w,\h, txt, \flag) ;1
(Line: 1199) => Case #PB_GadgetType_CheckBox : \idx = CheckBoxGadget(#PB_Any, \x,\y,\w,\h, txt, \flag) ;4 10:40:34] [WARNING] mysource.pb (Line: 1194)
[10:40:34] [WARNING] Gtk (CRITICAL): gtk_layout_put: assertion 'GTK_IS_LAYOUT (layout)' failed
[10:40:34] [WARNING] mysource.pb (Line: 1194)
[10:40:34] [WARNING] Gtk (CRITICAL): gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed
[10:40:53] [WARNING] mysource.pb (Line: 1199)
[10:40:53] [WARNING] Gtk (CRITICAL): gtk_layout_put: assertion 'GTK_IS_LAYOUT (layout)' failed
[10:40:53] [WARNING] mysource.pb (Line: 1199)
[10:40:53] [WARNING] Gtk (CRITICAL): gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed