Re: Windows issue

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu