BUG: Action Cannot Be Completed Because the Object Is BusyLast reviewed: August 28, 1995Article ID: Q120289 |
The information in this article applies to:
- Microsoft FoxPro for Windows, versions 2.5a, 2.5b, 2.6, 2.6a
SYMPTOMSWhen you are closing a document linked in a general field, Microsoft Windows reports the following error:
The action cannot be completed because the object is busy. WORKAROUNDFor an example of how to work around this problem, see "Workaround" in the "More Information" section below.
STATUSMicrosoft has confirmed this to be a problem in FoxPro versions 2.5a, 2.5b, 2.6, and 2.6a for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Problem
WorkaroundTo avoid the error, add the undocumented NOWAIT clause to the @ ... SAY VERB command specified in step 4. Unfortunately, this modification has a potentially undesirable side effect: NOWAIT implies that FoxPro will continue to process commands asynchronously until it encounters a wait state or end of program. WARNING: This function is undocumented, and therefore may be changed or omitted without notice from future releases of FoxPro. The reliability of this function is not guaranteed. If the @ ... SAY ... VERB command is associated with the VALID clause of a control such as a push button, the addition of the NOWAIT clause may prove harmless. If, however, further processing depends on the completion of the @ ... SAY ... VERB command, processing must be suspended until the focus returns to FoxPro. There are a few ways to accomplish this. One method is to display a dialog box with a terminating push button and some text requesting the user click the button to continue. Another method, shown below, uses FoxTools to continuously check if FoxPro is the frontmost application and continue when this condition is met.
* This code assumes that Word for Windows is running IF !'FOXTOOLS' $ SET('LIBRARY') SET LIBRARY TO FoxTools ADDITIVE ENDIF FoxWind = MAINHWND() *Get HWND of frontmost app GetActiveApp = REGFN('GetActiveWindow','','I') @0,0 SAY object VERB 'Edit' NOWAIT * Keep looping until the active window is FoxPro DO WHILE .t. IF FoxWind = CALLFN(GetActiveApp) EXIT ENDIF ENDDOThe disadvantage of this method is that it burdens the processor by looping continuously.
|
Additional reference words: FoxWin buglist2.50a buglist2.50b buglist2.60
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |