[阅读: 603] 2005-01-24 03:40:54
if not IsDefaultValue then
begin
WritePropPath;
if Value.Code = nil then
WriteValue(vaNil) else
WriteIdent(FLookupRoot.MethodName(Value.Code));
end;
function IsDefaultValue: Boolean;
var
DefaultCode: Pointer;
begin
DefaultCode := nil;
if AncestorValid then
DefaultCode := GetMethodProp(Ancestor, PropInfo).Code;
Result := (Value.Code = DefaultCode) or
((Value.Code <> nil) and (FLookupRoot.MethodName(Value.Code) = ''));
end;
就象你说的,这里的FLookupRoot是TMyPanel,而事件函数是写在Form中的,所以FLookupRoot.MethodName(Value.Code) = '')总是为True的。