Xbasic

uiFreeze Object

Description

The uiFreezeObject object is useful when you want to prevent screen redraw when code is running. Advantages of the UIFreeze object over the UI_FREEZE() function.

  • UIFreeze objects nest - If two different freeze objects exist, then the screen is not unfrozen until both objects have their .frozen property set to .t.

  • When the freeze object is deleted, or freed, it automatically unfreezes, so there is no need to write error handling code to fix UI_FREEZE()restore problems.

As result of the second point, when a user creates a script with a UI_FREEZE(.t.) and the script runs but encounters an error, the user does not have an error handler that does a UI_FREEZE(.f.). Alpha Anywhere is not left in a state where the screen is not getting refreshed. If the user uses UIFreezeOpbject, (assuming that the UIFreezeObject is instantiated using a local variable and not a shared or global variable) and an error occurs, the script stops executing. When the script stops, the local variable frame goes away, and the reference to the UIFreezeObject goes away, and as a result, the screen is no longer frozen. Deleting the uiFreezeObject object is equivalent to the freeze.frozen = .t. command.

Properties 

  • Frozen 

    Logical. Enables or disables screen drawing.

Methods 

The uiFreezeObject object has these functions:

  • Create() 

    Pointer. Creates a uiFreezeObject object.

See Also