I don't see why not if that's what you need to do but I wouldn't recommend it. If that event code manipulates GUI elements or calls DoEvents there might be a risk of re-entry. Even then it might be OK as long as your event code is threadsafe.can i addevent from all basic script objects to one sub
I think all the code involved is threadsafe so it should work as you would expect. CallHost runs on the script thread and behaves just like thread events in the Threading library. It posts a message to the main window thread message loop to run the event code in Basic4ppc on the main thread and waits until the event code finishes then returns. Normally an event cannot interrupt another event, although if you do DoEvents or manipulate GUI elements in your event code that might not be a good idea as that might run the main window message loop and let a second event re-enter your event code before the first has finished.all scripts run in threads.what happend,if 2 or more scripts fired CallHost at ONE moment?
All Basic4ppc events run on the main thread so they are allowed to manipulate GUI elements without risk.and when event fired,it performed in thread or main thread?
What sort of problem are you having?it is not good.
Which function, and what's missing from the help?:-[ may be sample for new function?and i not fint her in manual...
Read the third paragraph of the Threading topic of the FormExDesktop help and see the FormExDesktop.Sender property.i want see sender (Scripting object)
Sub test
Msgbox(formex.sender)
i=StrReplace(Sender,"script","")
'why sender is not a 'script'???
i=1
AddObject("formex"&i,"Formex")
Control("formex"&i,"Formex").new2("formm"&i,i,200,200)
Control("formex"&i,"Formex").showmodal
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?