Article ID: 151637 - Last Review: December 15, 1999 - Revision: 1.1 PRB: Visual FoxPro Mac Cannot Understand Apple Object TypesThis article was previously published under Q151637 SYMPTOMS
Microsoft 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.
WORKAROUND
You can cast or change the object, or a property of the object, into a
simple data type that Visual FoxPro understands.
STATUS
This behavior is by design.
MORE INFORMATION
The following examples illustrate the problem and the workaround:
Enter the script:
Can't make {...} into a string
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:
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:
Microsoft Visual FoxPro got an error: "do test2 with 'This is a test
of VFP and AppleScript.' doesn't understand the Do Script message.
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.
| Article Translations
|
Back to the top
