RAPI events and FormEXDesktop

KeithTX

New Member
Licensed User
Longtime User
Howdy All,

I have found that if I used FormExDesktop to extend my main form the RAPI Connected event no longer fires.

Original Code, rapi_Connected works fine
B4X:
Sub App_Start
   form1.Show
   rapi.New1
   rapi.Connect   
End Sub

With FormEXDesktop, rapi_Connected doesn't work.
B4X:
Sub App_Start
        FormEX.New1("Form1")
        FormEX.Run
   rapi.New1
   rapi.Connect   
End Sub

Anyone have any ideas?

Thanks,
-Keith
 

agraham

Expert
Licensed User
Longtime User
The event is being raised on another thread. Read the FormExDesktop help topic on Threading.

For version 2.0 of FormExDesktop try

NameOfFormEx1.EnableThreadEvent("rapi", "rapi_Connected")

or for earlier versions try

NameOfFormEx1.EnableThreadEvent("rapi", "rapi_Connected ", B4PObject(1))
 

KeithTX

New Member
Licensed User
Longtime User
Thank you. I should have read the documentation fully before asking. :)

-Keith
 
Top