Re: XMANAGER, and loops [message #6538 is a reply to message #6532] |
Sun, 07 July 1996 00:00  |
rivers
Messages: 228 Registered: March 1991
|
Senior Member |
|
|
In article <31DD76B6.4FD0@potomac.net>, "George, Rachel, and Molly" <gmccabe@potomac.net> writes:
> Hello,
>
> I am trying to create a widget program with several functions
> called by button events. The XMANAGER is used with a widget event
> handler inside which a CASE statement block contains the possible events
> and corresponding program responses.
> If one of the widget buttons is for beginning a continuous loop
> like for example what I want to do is shuffle through a stack of images
> from beginning to end and repeat until another button is pushed, the STOP
> button. How do I retreive the event using the XMANAGER when the event
> handler procedure is stuck in a loop? That at least is how I have
> attempted to construct the procedure, in this form it does not work. If
> I knew how to give control back from the XMANAGER and enter a mode where
> I use WIDGET_EVENT statements within the loop then I could but, I can't
> figure out how.
One way to do this is to do the following:
- User presses START button
- Event handler sets mode = "image loop" and sets a timer for .1 seconds
- If the next event is a timer event and mode="image loop" then display
next image and set timer again, etc.
- If next event is STOP button then set mode="normal"
____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
|
|
|