Re: Event handling stops for no reason? [message #69993 is a reply to message #69992] |
Wed, 03 March 2010 16:29   |
MichaelT
Messages: 52 Registered: May 2006
|
Member |
|
|
Now I was finally able to reproduce it again. It is not the send_event
= {info...} but the second send_event that I use.
This is what happens:
I initiate the program via an event. Within the event handler of the
main program the sub-program is started and does the following:
Print '1'
Widget_Control, self.Group_Leader, Send_Event = {Info, 0L, 0L, 0L,
(*self.lang).info}
(then I let the event handler print the info text)
Print '2'
...
some calculations
...
Print, '4'
self->Finished, 1
Print, '5'
Return
self->Finished, 1 does the following (and only this):
Widget_Control, self.Group_Leader, Send_Event = {Processing, 0L, 0L,
0L, ok, self.preset}
{Processing} is defined as:
void = {Processing, ID: 0L, Top: 0L, Handler: 0L, ok: 0, preset: 0}
It sends an event to the event handler of the main program.
IDL prints 1, info text, 2, ..., 4 and 5, so I assume the event is
sent.
The next processing step is not initiated which has the same structure
as the previous one. The info label is not updated (I said so
otherwise, before, sorry) and the next "1" is not printed. Only when I
move the mouse onto the GUI does IDL resume processing and print the
1, ...
This is the chain of events (also judging from what IDL prints:
1. First step finished, send event to event handler.
2. Enters event handler, maps GUI and does what I have written above
(basically all done within event handler).
3. Prints "1"; GUI sends event to update label (works); prints label
text.
4. Prints "2" through "4"
5. GUI sends event to initiate another GUI.
6. Prints "5"
7. Leaves event handler.
8. Processes next event in cue.
9. Should now map next GUI and print "1", label text, "2" ... Does not
do that.
This is not regularly reproducible... Sometimes it works for several
steps only to stop again.
Cheers,
Michael
|
|
|