Page 1 of 1

SetGadgetText() in threads

Posted: Fri Jan 26, 2007 9:46 pm
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.

Posted: Mon Apr 02, 2007 8:47 pm
by freak
Unfortunately it seems like the mozilla engine does not accept calls made from other threads.
I see no way to fix that.