中国开发网: 论坛: 程序员情感CBD: 贴子 86424
王中王: 是没保存,这个问题不好解决:
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的。
http://wangzw.wordpress.com/
个性化台历、日历制作
http://shop33697570.taobao.com/

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录