The information in this article applies to:
SYMPTOMSMicrosoft Visual FoxPro for Power Macintosh does not support the Apple Object Model. Apple Objects such as "paragraph" , "word", "range", etc., cannot be passed directly or indirectly to Visual FoxPro for Power Macintosh. WORKAROUNDYou can cast or change the object, or a property of the object, into a simple data type that Visual FoxPro understands. STATUSThis behavior is by design. MORE INFORMATION
The following examples illustrate the problem and the workaround:
Enter the Visual FoxPro program:
Run the script and note that you get the following error message:
What you attempted to do was try to pass an Excel "Range" to Visual FoxPro, which does not understand what a range of cells is. To work around this behavior, comment out the line [get Range "R1C1"] and uncomment the line [--get Value of Range "R1C1"]. Save the script, run it, and note that the process works properly because Visual FoxPro understands the "Value of" simple string type that is passed. Following is another example of an attempt to pass data to Visual FoxPro. This example also fails initially, but returns a different error message. Enter the script:
Enter the Visual FoxPro program:
Enter the Scriptable Text Editor file 'TestText':
This is a test of VFP and AppleScript.After you create the files and you run the script, STE2VFP, you will get the following error message: Once you have cleared the error message, edit the script STE2VFP. Comment out the line [get contents of document 1] and uncomment the line [-- get contents of document 1 as string]. Save the script and run it. You will get a dialog window from Visual FoxPro displaying the number of characters in the string that was passed. NOTE: You cannot pass a string longer than 255 characters to Visual FoxPro in this manner. If you attempt to pass a longer string, Visual FoxPro appears to hang on the Do Script command used to pass the variable to Visual FoxPro. To pass strings longer than 255 characters, use an ASCII text file that Visual FoxPro can append into a memo field or that can be read using low-level file I/O. Additional query words: VFoxMac
Keywords : FxinteropGeneral |
Last Reviewed: December 14, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |