Kilian Sprotte kilian.sprotte@gmail.com writes:
Hi,
I have a very beginners question about calling a command from a push-button.
It seems that I need to call redisplay-frame-panes in the activate-callback, although this is not necessary if I invoke the command from the interactor.
(button2 push-button :label "incf and call REDISPLAY-FRAME-PANES" :activate-callback (lambda (button) (declare (ignore button)) (com-incf) ;; * (redisplay-frame-panes *application-frame*)))
Is an activation of a push-button not an event in the command-loop?
Indeed not, events/callbacks are asynchronous and separate from the command loop.
I would be glad to know, how this is supposed to be done.
Manually redisplaying seems like an adequate solution. If your program is large, or does advanced things with its command loop, you may want to cause callbacks to integrate with it by various means, though.