Automatic Activation of Verbs in Developer Help
|
|
Problem description:
I am wondering if there is a specific function that can be called to cause a verb to be executed without the user having to manually click the verb. If there is not an easy way of doing this, then please read on so that you can fully understand my dilemma.
I noticed an interesting difference between verbs and procs. When a proc is activated, the block of code within it must be fully executed before moving on to the following line of code (after the line at which the proc is called). Verbs, on the other hand, do not wait on other verbs or procs that are being executed at the time they're called. So, it would seem that verbs are multithreaded, whereas procs are not. Well, I am relying on this multithreading capability so that I can execute a particular verb multiple times without having to wait for the code block to be finished with its execution each time.
I have created a verb. When this verb is called, a proc is called beneath it. This proc takes about six seconds to be executed completely. I want the verb to automatically be executed before those six seconds elapse, and again, and so on and so forth. When the user clicks the verb, there is no delay - the code is executed immediately, regardless of whether or not the code is still pending the previous execution of the verb. I want for this to happen without the user having to click the verb. Alternatively, when I place multiple procs beneath the verb, each successive proc pends until the previous one has been executed completely. Please don't tell me to use procs (I know that procs can be executed automatically), unless you can provide a description of how to multithread them.
|