PEM_DEFINEDreturns:
False I can say with certainty that the property is not defined and that he is not readable. defined info 100%, readable info 100% True I can say with certainty that the property is defined, but do not know if it is readable. defined info 100%, readable info 0%On VFP9 when
PEM_DEFINEDreturns:
False I can say with certainty that the property is not readable, but do not known if it is defined. defined info 0%, readable info 100% True I can say with certainty that the property is defined, but do not know if it is readable. defined info 100%, readable info 0%On VFP9 I can remove the uncertainty only if I know with certainty that the property is native or not.
PEM_DEFINEDi known this with a command,
CLEAR *-- PEMSTATUS Attribute #DEFINE PEM_CHANGED 0 #DEFINE PEM_READ_ONLY 1 #DEFINE PEM_PROTECTED 2 #DEFINE PEM_TYPE 3 #DEFINE PEM_USER_DEFINED 4 #DEFINE PEM_DEFINED 5 #DEFINE PEM_INHERITED 6 aso = CREATEOBJECT("subClass1") * now, can i control a hidden property * for a baseclass hidden property IF PEMSTATUS(m.aso,"Width",PEM_DEFINED) && this have to return .T., becuse width it is defined but hidden IF !PEMSTATUS(m.aso,"pippo",PEM_PROTECTED) =m.aso.Width && on VFP8 i have a error here ENDIF ELSE aso.AddProperty("Width",99) && on VFP9 i have a error here ENDIF * for a class hidden property IF PEMSTATUS(m.aso,"pippo",PEM_DEFINED) IF !PEMSTATUS(m.aso,"pippo",PEM_PROTECTED) =m.aso.pippo && on VFP8 AND VFP9 i have a error here ENDIF ELSE aso.AddProperty("pippo",.T.) ENDIF * for a class protected property i can control my work IF PEMSTATUS(m.aso,"prisco",PEM_DEFINED) IF !PEMSTATUS(m.aso,"prisco",PEM_PROTECTED) =m.aso.prisco && on VFP8 AND VFP9 i have a error here ENDIF ELSE aso.AddProperty("prisco",.T.) ENDIF RETURN * my solution: * add #DEFINE PEM_READABLE 7 && for not defined,hidden return .F., for protected retun .F. on a object * WITH THIS I CAN WRITE: DO CASE CASE PEMSTATUS(m.aso,"pName",PEM_READABLE) =m.aso.pName CASE !PEMSTATUS(m.aso,"pName",PEM_DEFINED) && this require a rollback for the new VFP9 behaviour aso.AddProperty("pName",.T.) CASE PEMSTATUS(m.aso,"pName",PEM_PROTECTED) * control the protected property OTHERWISE * control the hidden property ENDCASE DEFINE CLASS subClass1 AS Cursor HIDDEN pippo PROTECTED prisco ENDDEFINEFabio