SetGadgetText() in threads

Linux specific forum
WishMaster
Enthusiast
Enthusiast
Posts: 277
Joined: Fri Jun 17, 2005 7:13 pm
Location: Franconia
Contact:

SetGadgetText() in threads

Post by WishMaster »

Code: Select all

Procedure ChangeURL(URL.s)
    SetGadgetText(1, URL.s)
EndProcedure

OpenWindow(1, 0, 0, 800, 500, "Well...")
    CreateGadgetList(WindowID(1))
    WebGadgetPath("/usr/lib/xulrunner-1.8.1b2/libgtkembedmoz.so", "/usr/lib/firefox")
    WebGadget(1, 0, 0, 800, 450, "")
    ChangeURL("http://google.nl/nl")
    
    ButtonGadget(2, 0, 460, 800, 30, "Exalead...")
    Repeat
        Event = WaitWindowEvent()
        If Event = #PB_Event_Gadget And EventGadget() = 2
            CreateThread(@ChangeURL(), "http://www.exalead.com")
        EndIf
    Until Event = #PB_Event_CloseWindow
Malheureusement , this code also doesn't work in threadsafe mode.
Image Image
freak
PureBasic Team
PureBasic Team
Posts: 5944
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Unfortunately it seems like the mozilla engine does not accept calls made from other threads.
I see no way to fix that.
quidquid Latine dictum sit altum videtur
Post Reply