[futurebasic] Re: [FB] Window display problem

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2005 : Group Archive : Group : All Groups

From: Steve Crossman <steve@...>
Date: Sun, 30 Jan 2005 13:34:47 -0500
Create the window and then handle events that occur for the window from 
one main event loop.

Brian suggested more than one event loop isn't bad, but why do you need 
more than one?


On Jan 30, 2005, at 11:22 AM, Richard Goodman wrote:

> I have a window full of buttons and edit fields as well as several DEF 
> TITLERECT calls.
> The window is constructed invisibly:
> WINDOW -3, "Define the Characteristics of a Clone", (0,0)-(550, 280), 
> _docNoGrow
>  // code for buttons and edit fields here.
>
> The DEF TITLERECT calls are handled in dialog processing (_wndRefresh)
>
> When I finally activate the window, the window is visible immediately, 
> but none of the contents is drawn until later. Therefore, anything 
> that stops program flow, prevents the window's contents from showing.
>
> I want to put a DO/UNTIL loop in to allow the user to make choices 
> among the buttons, but the buttons don't show:
>
> LOCAL
> DIM AS SHORT x
> DIM AS STR31 temp
> LOCAL FN Definetheclones
> WINDOW 3
>
> DO
>    FOR x = 1 to gnumclones
>       gAllDone = _false
>       gCloneNumber = x
>       temp = "Clone #" + str$(gCloneNumber)
>       EDIT FIELD #1,temp
>    NEXT
>    TRON x
> UNTIL gAllDone = _ztrue
>
> END FN
>
> Why would the WINDOW 3 statement in the FN above, not allow the 
> contents of the window to show immediately? What am I doing wrong?
>
> If I put a HANDLEEVENTS inside the DO/UNTIL loop, Window 3 shows its 
> contents. It seems that in order for the window to display its 
> contents, there has to be a call to HANDLEEVENTS. However, I already 
> have HANDLEEVENTS in a main loop.
>
> In order to get this to work, I have to violate the rule of not having 
> more than one HANDLEEVENTS in a program.
>
> Any suggestions?
> -- 
> Richard le bon homme
> --
> To unsubscribe, send ANY message to: 
> futurebasic-unsubscribe@...