(dcl-control-SetEnabled ctrlName nil) failing

Started by Jim Short, October 16, 2017, 02:40:53 PM

Previous topic - Next topic

Jim Short

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
Jim Short

owenwengerd

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 Event Invoke property to '1 - Asynchronous '. Alternatively, your event handler can post a command (using e.g. dcl-SendString) and return immediately so that Windows can catch up with all waiting work before running the command and freezing things up again.
Owen Wengerd (Outside The Box) / ManuSoft

Jim Short

Thanks Owen,
Run button already Asynchronous.
Will try dcl-sendstring.
Jim
Jim Short

Jim Short

dcl-sendstring did not work either.
I will pursue different approach.
Jim Short