Programming Guide : 3. Programming Frames : How You Can Invoke Frames : How You Can Block an Open Frame
 
Share this page                  
How You Can Block an Open Frame
The BlocksFrames attribute defines whether an executing event block or called procedure in a frame blocks activity in other active frames until it completes.
By default, when OpenROAD executes an event block or a called procedure in a frame, activity in other active frames is blocked. The user cannot perform any actions until the event block or procedure completes. This behavior is controlled by the BlocksFrames attribute.
When you start an application, OpenROAD sets the BlocksFrames attribute to TRUE for the application's starting component. Each subsequent component inherits the value of this attribute from its calling component. Consequently, unless you explicitly set BlocksFrames to FALSE, it remains TRUE for all components, and the application exhibits the default behavior.
If you set the BlocksFrames attribute to FALSE, the frame in which you changed it and any children of that frame (opened after you made the change) appear active to the user. Although the frame is actually still blocked while OpenROAD is executing an event block or procedure, the hourglass cursor does not appear, and the user can type data in an entry field. Note that this ability does not affect the processing of the event queues. The work the user does while OpenROAD is executing code is buffered and then placed in the native event queue when OpenROAD completes the event block or procedure.
You can change the BlocksFrames attribute in either of the following ways:
When you open a frame, using the with clause of the callframe, openframe, or gotoframe statement, for example:
status = callframe newframe with
   BlocksFrames = FALSE;
Inside an event block, by direct assignment, for example:
on click updt_button =
begin
   CurFrame.BlocksFrames = TRUE;
   ...
   CurFrame.BlocksFrames = FALSE;
end;
Set BlocksFrames to FALSE only for those events and procedures that should return quickly. If a frame has some event blocks that take little time to complete and some that take much longer, start the frame with BlocksFrames set to FALSE and change it to TRUE for the long event blocks. If you allow a long event to run with BlocksFrame set to FALSE, an inactive frame will not display the hourglass cursor and yet the user cannot choose it to execute an operation such as clicking a button.
The BlocksFrames attribute does not affect the behavior of the calling frame when OpenROAD is executing a:
Callframe statement
A frame executing a callframe statement is always blocked.
Gotoframe statement
The frame that executes a gotoframe statement is closed.
Message statement
A frame executing a message statement, directly or indirectly, is always blocked.
Prompt statement
A frame executing a prompt statement, directly or indirectly, is always blocked.
WaitFor method call
A frame that executes a WaitFor method is blocked until the method completes.