PRB: Cannot Load the Same Class Library More Than OnceLast reviewed: January 20, 1997Article ID: Q156341 |
The information in this article applies to:
SYMPTOMSVisual FoxPro version 5.0 does not allow you to load the same class library more than once, using the "SET CLASSLIB... ALIAS ... ADDITIVE" command.
WORKAROUNDIf you want to load the same class library multiple times, you have to create multiple copies of the same class library in different directories and then load each one. Following is an example to do so:
SET CLASSLIB TO **Make a temp directory in the HOME() directory** MD HOME()+'temp' **Copy the Class Library files to the temp directory** COPY FILE HOME()+'wizards\wizstyle.vc?' to HOME()+'temp\wizstyle.vc?' **Load First instance of the Class Library** SET CLASSLIB TO HOME()+'wizards\wizstyle' ALIAS one **Display the Class Library(ies) Loaded into memory** ?SET('CLASSLIB') **The above command will display the First Library** **Load second instance of the Class Library SET CLASSLIB TO HOME()+'temp\wizstyle' ALIAS two ADDITIVE **Display the Class Library(ies) Loaded into memory** ?SET('CLASSLIB') **The above command will display both instances of the library** STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce BehaviorThe following steps demonstrate that, although the second instance of the Class Library is opened using the ALIAS and ADDITIVE clause, the first instance of the same class is closed, and only the second instance of the Class remains loaded into memory:
|
KBCategory: kbprg kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |