[PB5.4/5.6, gtk2/gtk3] GadgetToolTip on SplitterGadget crash

Just starting out? Need help? Post your questions and find answers here.
Oma
Enthusiast
Enthusiast
Posts: 312
Joined: Thu Jun 26, 2014 9:17 am
Location: Germany

[PB5.4/5.6, gtk2/gtk3] GadgetToolTip on SplitterGadget crash

Post by Oma »

On the tested PB-Versions 5.4x and 5.6x, with gtk2 and gtk3 a GadgetToolTip on SplitterGadget crashes.
[19:48:04] [ERROR] Line: 12
[19:48:04] [ERROR] The specified #Gadget is not initialised.
Only tested on Xubuntu 14.04, x32.
From help-example (with additional ToolTip) ...

Code: Select all

  If OpenWindow(0, 0, 0, 230, 180, "SplitterGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    #Button1  = 0
    #Button2  = 1
    #Splitter = 2

    ButtonGadget(#Button1, 0, 0, 0, 0, "Button 1") ; No need to specify size or coordinates
    ButtonGadget(#Button2, 0, 0, 0, 0, "Button 2") ; as they will be sized automatically
    SplitterGadget(#Splitter, 5, 5, 220, 120, #Button1, #Button2, #PB_Splitter_Separator)

    TextGadget(3, 10, 135, 210, 40, "Above GUI part shows two automatically resizing buttons inside the 220x120 SplitterGadget area.",#PB_Text_Center )
    
    GadgetToolTip(GadgetID(#Splitter), "Splitter")
    
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
Regards, Charly

ps: And thanks again for the many bugs already fixed. :D
PureBasic 5.4-5.7, Linux: (X/L/K)Ubuntus+Mint - Windows XP (32Bit)
PureBasic Linux-API-Library & Viewer: http://www.chabba.de
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: [PB5.4/5.6, gtk2/gtk3] GadgetToolTip on SplitterGadget c

Post by freak »

This time its just a coding error: The GadgetID() call is not supposed to be there. :wink:
quidquid Latine dictum sit altum videtur
Oma
Enthusiast
Enthusiast
Posts: 312
Joined: Thu Jun 26, 2014 9:17 am
Location: Germany

Re: [PB5.4/5.6, gtk2/gtk3] GadgetToolTip on SplitterGadget c

Post by Oma »

Sorry, :oops: I scratched my head but I didn't see it.
I think I'm already too familiar with GadgetId().

Regards, Charly
PureBasic 5.4-5.7, Linux: (X/L/K)Ubuntus+Mint - Windows XP (32Bit)
PureBasic Linux-API-Library & Viewer: http://www.chabba.de
Post Reply