(dcl-control-SetEnabled ctrlName nil) failing

Started by Jim · 2017-10-16 21:40 UTC · 3 replies · SMF topic #2538

I have a docked form with a tree that will not respond to (dcl-control-SetEnabled treeCntrl nil) when called from c:uMill/Outline/RunButton#OnClicked if it is followed by any expression that has a loop. (any being untested for every possibility)
A F9 stop in Visual Lisp  will allow the desired affect. Removing it will by pass the affect. Does anyone have ideas about what is going on here?
Jim
When your lisp code is in a loop, no Windows messages can be processed, so pending Windows messages just sit in the queue waiting to be processed. Meantime the UI is "frozen". You can probably resolve this by changing your button's {2} property to '1 - Asynchronous '. Alternatively, your event handler can post a command (using e.g. {2}) and return immediately so that Windows can catch up with all waiting work before running the command and freezing things up again.
Thanks Owen,
Run button already Asynchronous.
Will try dcl-sendstring.
Jim
dcl-sendstring did not work either.
I will pursue different approach.