PRB: "Property Not Found" Occurs When Running FormLast reviewed: April 30, 1996Article ID: Q129207 |
The information in this article applies to:
SYMPTOMSThe following error message displays while you are running a form:
Property Not Found CAUSEThe period (.) operator was used in conjunction with macro substitution to reference a property that contains the name of an object. Because the compiler recognizes the period as the macro terminator, it doesn't evaluate the remainder of the line that contains the property.
WORKAROUNDTo work around this problem, add an additional period after the macro substitution. The first period terminates the macro and the second allows the compiler to reference the property. For example, to fix the problem, refer to the "Steps to Reproduce Behavior" section of this article, and replace the lines that use a single period to reference properties with the following lines of code:
This.&cOButton..Caption="Button"-cOldbNo && Originally used one period This.&cOButton..Picture=''*** ...
This.&cButton..Caption="" && These lines are farther This.&cButton..Picture='c:\vfp\fox.bmp' && down in the exampleNOTE: Macro substitution can usually be replaced by the superior EVALUATE() function, but using EVALUATE() requires an additional line of code. In this example, program execution is faster and the amount of executable code generated by the compiler/linker is smaller. For example: Instead of:
This.&cOButton..Picture=''Use:
oRef=EVAL("THIS."+cOButton) oRef.Picture='' STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce BehaviorThe following program displays a form that contains three buttons (Button1, Button2, and Button3). Macro substitution is used to modify the Picture and Caption properties of these objects.
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |