1. Windows issue
- Posted by George Henry <ghenryca at HOTMAIL.COM> Dec 10, 2000
- 490 views
- Last edited Dec 11, 2000
------=_NextPart_000_2c0_107c_7971 Hello, Thanks to Euman for trying to assist me with my problem, but I don't think I made it exactly clear what I wanted. (That was probably because I wasn't 100% clear on it, myself.) So I hereby attach code that actually runs, and demonstrates the situation. One thing this exercise has shown me is that most of my difficulty must be in my code, because the short attached example does a large part of what I want, without untoward side effects. However, it is evident that I need something like VB's DoEvents to actually *pause* my program and wait for the user to complete their dealings with the modal window before proceeding. Sometimes event-driven processing is just a pain, the opposite of what is needed. Sometimes it is entirely approriate for *the program* to have more control of the flow (pause, wait, etc.) of processing. I am investigating how to emulate DoEvents in Euphoria. If anyone has already solved this problem, or has a better solution to my control-flow needs, please let me know. TIA as usual, George _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ------=_NextPart_000_2c0_107c_7971
2. Re: Windows issue
- Posted by Jeffrey Fielding <JJProg at CYBERBURY.NET> Dec 10, 2000
- 492 views
On Sun, 10 Dec 2000, George Henry wrote: > Hello, > > Thanks to Euman for trying to assist me with my problem, but I don't think I > made it exactly clear what I wanted. (That was probably because I wasn't > 100% clear on it, myself.) So I hereby attach code that actually runs, and > demonstrates the situation. > > One thing this exercise has shown me is that most of my difficulty must be > in my code, because the short attached example does a large part of what I > want, without untoward side effects. However, it is evident that I need > something like VB's DoEvents to actually *pause* my program and wait for the > user to complete their dealings with the modal window before proceeding. > > Sometimes event-driven processing is just a pain, the opposite of what is > needed. Sometimes it is entirely approriate for *the program* to have more > control of the flow (pause, wait, etc.) of processing. > > I am investigating how to emulate DoEvents in Euphoria. If anyone has > already solved this problem, or has a better solution to my control-flow > needs, please let me know. > > TIA as usual, > George > > > _____________________________________________________________________________________ > Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com > > > Why not just do something like this: procedure update_text(sequence name) text &= "in " & name & "() counter=" & sprint(counter) & "\r\n" if remainder(calls, 5) = 0 then if not isOpen3 then openWindow(win3, Modal) end if setText(ctrlText3, text) -- And here I want the program to STOP and WAIT until the user -- closes the modal window. If Euphoria/Win32lib had a DoEvents -- function like Visual Basic, I would write: -- -- while isOpen3 do doEvents() end while end if -- if not isOpen2 then -- openWindow(win2, Normal) -- end if -- setText(ctrlText2, text) -- setFocus(win1) end procedure procedure onClose_win3() isOpen3 = False setFocus(win1) if not isOpen2 then openWindow(win2, Normal) end if setText(ctrlText2, text) setFocus(win1) end procedure
3. Re: Windows issue
- Posted by Derek Parnell <derekp at SOLACE.COM.AU> Dec 11, 2000
- 482 views
Due to requests from a few other people too, these two routines had already been added to the library ... doEvents( id ) this is similar to the VB function. It releases control to Windows to process any events outstanding. It is meant to be used in long running user event handlers so that other windows events can have a chance. This is because no windows events get attended to while user code in an event handler is running. The ID parameter can be zero for all events, or just the events for a specific control id. openDialog( id ) This opens a window as modal but does not return control to the next line of code until that window is closed. This is different to openWindow(id, Modal) which returns control to the next line of code immediately the window is opened. The latest version (0.54.4) is still at ----- cheers, Derek Parnell