

Registered forum members do not see this ad.
Hi All
Please help me a problem.
I have some reactor function in one file.
The first time load lisp, i will decided which reactor to used follow a variable (call x) like :
But value of x can be changed later when user choice other method (by a dialog). how can i watching x value to decided what to do next ?Code:(cond ((= x 1)(setq Reactor-Put1 (vlr-editor-reactor nil '((:vlr-commandended . Function1))))) ((= x 2)(setq Reactor-Put2 (vlr-editor-reactor nil '((:vlr-commandended . Function2))))) ((= x 3)(setq Reactor-Put3 (vlr-editor-reactor nil '((:vlr-commandended . Function3))))) )
Ex : default value of x is store in registry as 1. So the first time it will call function1 reactor. But then user change it value to 2. How can i run actor function2 and remove vlr funtion1
Have i make a temple function to call ?
Thanks all for reading![]()


Registered forum members do not see this ad.
Have a look at the vlr function list there are a few functions to deal with reactors
Vlr-remove & vlr-reactors.
When dealing with reactors it’s a good idea to check and see if a reactor is loaded before calling it again.
If you call it twice there will be 2 instances of the reactor running
So in your cond statement you can use (if (not reactor-put1 (setq reactor-put1…………..
So if the user selects another reactor you need to unload the current one using
(if reactor-put1(vlr-remove reactor-put1))
From my experience reactors are hard to debug so you only want to load then once and remove them when done unless you want them to be persistent.
Bookmarks