PRB: @...GET...NAME Object References Change with Read LevelLast reviewed: January 10, 1997Article ID: Q156178 |
The information in this article applies to:
SYMPTOMSYou may see the following error when referencing objects created using READ- type code with the NAME keyword (DEFINE WINDOW...NAME and @...GET...NAME):
"Unknown member <objectname>"This occurs in situations with multiple READ levels.
CAUSEWhen objects are created using the NAME keyword, each one is added to a page within a PageFrame control. The page number corresponds to the READ level.
WORKAROUNDReference objects in the following manner:
<FormName>.Pageframe1.Page<rdlevel()>.<ObjectName>.PropertySee the MORE INFORMATION section below for details.
STATUSThis behavior is by design.
MORE INFORMATIONThe NAME keyword creates an object reference for controls created with the DEFINE WINDOW, @ ... GET, and @ ... EDIT commands, allowing you to manipulate these objects' properties, events, and methods.
Steps to Reproduce Behavior
* Start of code example * FUNCTION When2 LOCAL lcPageNumber lcPageNumber=ALLTR(STR(RDLEVEL())) oForm2.Pageframe1.Page&lcPageNumber..loGet2.Value = "456" ENDFUNC * * End of code exampleThis stores the current READ level to lcPageNumber and substitutes it back into the object reference. This allows the object loGet2 to be referenced regardless of READ level.
REFERENCESFor more information about using the NAME keyword with the DEFINE WINDOW and @ GET commands, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q138780 TITLE : How to Use the Name Argument of an @...GET in Visual FoxPro |
KBCategory: kbusage kbui kbprg kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |