Threads

Hello i am Giorgos,

I have a problem with threads. Within my program1 i am doing some process and i would like in the meantime to show a window with "please waiting" message so the user to know that must wait. 

So i am doing a call "cancel" and the program1 calls the program2 that has the waiting window but there it is stays with no respond. what i am doing wrong?


program1:

*
GRAPH-PRESSED-DO-IT.
evaluate true
when GRAPH-Pressed| Search-Pressed| search-button-pushed
move zero to thread-return
set done to false
CALL thread "Cancel",
handle cancel-thread
returning into thread-return
end-CALL
perform search-thru-records
end-evaluate. 
.

*
search-thru-records.
perform until done
if (thread-return = 99)
set done to true
stop thread cancel-thread
else
PERFORM GRAPH-Ev-Cmd-Clicked
* set done to true
* stop thread cancel-thread
end-if
end-perform
.

program2:
*
Cancel-Screen1-Ev-Cmd-Activate.
* perform until cancel-button-hit
* display Cancel-Screen1
* end-perform.
close window Cancel-Screen1-Handle.
destroy Cancel-Screen1.
goback returning 99. 
.

Tags: