Hello!
I'm now beginning to write my first GUI with McClim, and there seem to be an abundance of interface-building resources, so I'll be able to keep going for a while without help. I am writing this as an additional user interface to our backend program.
The backend is a calendar program used at my university (Linköping University) to teach abstraction. The idea is that either manual interaction with the backend or interaction via the Clim frontend can be used, at the same time or separately. Anything done in one should be observable in the other.
The problem I know I will eventually run into is updating the Clim interface when changes to data have been made through manual interaction with the backend. The solutions are either push or pull based, I guess. Push based is not really prefered, because the backend would have to keep track of the gui so it can send messages to it. We need to keep the backend as simple and clean as possible, because it is to be modified by the students. Thus I would rather prefer a pull-based approach where, every 80-90ms or so the application itself requests up-to-date data from the backend and redraws if necessary. Is there a standard way to go about this? It seems like it is a problem that would appear in almost any application.
Regards, Oliver Uvman
Oliver Uvman oliver.uvman@gmail.com writes:
Thus I would rather prefer a pull-based approach where, every 80-90ms or so the application itself requests up-to-date data from the backend and redraws if necessary. Is there a standard way to go about this? It seems like it is a problem that would appear in almost any application.
Maybe you need 'incremental redisplay' facility? See section 14.3 in LispWorks CLIM 2.0 spec. However, I don't know about its state in McCLIM.
If you choose to go the route of continually polling state and refreshing the display, I've explained several times in the past (with the occasional code example) how to do similar things, using a second thread that wakes the application through its event queue. Here's something to look at:
http://common-lisp.net/pipermail/mcclim-devel/2008-December/006985.html
For your application, you might modify the handle-event method, or the lambda stored in the interrupt-event.
Big thanks! I'm very glad I sent this mail ahead of time. All answers are greatly appreciated, will probably get in on solving this in five-six days.
/Oliver
On Thu, Jul 15, 2010 at 00:42, Andy Hefner ahefner@gmail.com wrote:
If you choose to go the route of continually polling state and refreshing the display, I've explained several times in the past (with the occasional code example) how to do similar things, using a second thread that wakes the application through its event queue. Here's something to look at:
http://common-lisp.net/pipermail/mcclim-devel/2008-December/006985.html
For your application, you might modify the handle-event method, or the lambda stored in the interrupt-event.