PRIVATE xoProps xoProps = NEWOBJECT('EMPTY') ADDPROPERTY(xoProps,'MyClassLibrary','') DO (_CODESENSE) WITH 'RunPropertyEditor','','GetClass'This is the "GetClass" entry in Foxcode.dbf
TYPE = "E" ABBREV = "GetClass" CMD = "{ClassScript}This is the "ClassScript" entry in Foxcode.dbf
LPARAMETER tcProp IF VARTYPE(xoProps) = "O" lcLibrary = "" lcClass = "" llGetClass = .T. * SEE IF THERE ARE ANY MEMBERS IN THE xoProps object IF AMEMBERS(laMembers, xoProps) > 0 * get the current values of both the Class and ClassLib FOR EACH lcMember IN laMembers IF "library" $ LOWER(lcMember) lcLibrary = LOWER(lcMember) ELSE lcClass = LOWER(lcMember) ENDIF ENDFOR * Make sure that library and class values are filled in DO CASE CASE EMPTY(lcLibrary) AND NOT EMPTY(lcClass) lcLibrary = lcClass + "library" CASE NOT EMPTY(lcLibrary) AND EMPTY(lcClass) lcClass = STRTRAN(lcLibrary, "library") ENDCASE * get value for library and class lnSelObj = ASELOBJ(laObjs) IF lnSelObj = 0 lnSelObj = ASELOBJ(laObjs,1) ENDIF IF lnSelObj > 0 FOR EACH loCtrl IN laObjs IF PEMSTATUS(loCtrl,lcLibrary,5) AND PEMSTATUS(loCtrl, lcClass, 5) EXIT ENDIF ENDFOR * get the current value in the properties lcLibraryValue = loCtrl.&lcLibrary. lcClassValue = loCtrl.&lcClass. TRY llGetClass = AGETCLASS(laClass, lcLibraryValue, lcClassValue) CATCH llGetClass = AGETCLASS(laClass) ENDTRY IF llGetClass * set the values to the properties. loCtrl.&lcLibrary. = JUSTFNAME(laClass[1]) loCtrl.&lcClass. = JUSTSTEM(laClass[2]) ENDIF ELSE MESSAGEBOX("MEMBERDATA not setup correctly - ASELOB", 16, "Class Script") ENDIF ELSE MESSAGEBOX("MEMBERDATA not setup correctly - AMEMBERS", 16, "Class Script") ENDIF ENDIF RETURN