The following example creates an array named aClassLib. The directory is changed to the Samples subdirectory containing the sample class libraries. AGETCLASS( ) is used to display a dialog with the Buttons class library and the VCR class selected. If you choose the Modify button, the name of the class library and class you select is stored in the array. The class is then opened in the Class designer.
LOCAL aClassLib(2) && Create an array, initialized to .F.
cCurrentDir = CURDIR( ) && Save the current directory
CD HOME(2) + 'CLASSES' && Switch directories
AGETCLASS(aClassLib, 'BUTTONS.VCX', 'VCR', 'Modify Class', ;
'Class File:', 'Modify') && Display the dialog
CD (cCurrentDir) && Switch to the previous directory
IF TYPE('aClassLib(2)') = 'C' && Class chosen?
MODIFY CLASS (aClassLib(2)) OF (aClassLib(1)) && Open to modify
ENDIF