AddProperty

ClassLibrary

This property contains the name of the class library (VCX) containing the class definition that an object is based on. It's the library containing the definition for the object's Class.

Usage

cClassLibrary = oObject.ClassLibrary
You can look, but you can't touch. This one is read-only all the time. Intrepid hackers may think that diddling with this field at the SCX or VCX level is the only way to directly switch an object from one class hierarchy to another. We prefer not messing with the underlying power tool tables directly whenever possible (and then only with lots of backups!).

We suggest two alternatives. First, you can use the Class Browser's Redefine function to do this sort of thing. The other alternative is to query an existing object at design-time and create a matching object with appropriate properties, events and methods, then delete the original object. A perfect job for a Builder! See "Builders and Wizards (and Bears, Oh My!)" in the "But Wait, There's More!" section.

ClassLibrary contains the full path to the library.

Example

IF cmdQuit.ClassLibrary = cmdSave.ClassLibrary    WAIT WINDOW "Hey, we're brothers!" ENDIF

See Also

Class, Set ClassLib


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net