[mcclim-devel] calling command from activate-callback
Troels Henriksen
athas at sigkill.dk
Sun May 31 15:50:52 UTC 2009
Kilian Sprotte <kilian.sprotte at 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.
--
\ Troels
/\ Henriksen
More information about the mcclim-devel
mailing list