摘要: inherited就是调用祖先类的函数,如果不带参数就是默认调用同名函数如果带参数则表明子类中的函数个数可能比祖先类要多取其中的几个参数传过去例如祖先类有个函数 Create(AName:string);子类有个函数 Create(AName:string;AComponent:TObject);override;那么子类的Create函数内就可以这样调用祖先类:procedure TAClass.Create(AName:string;AComponent:TObject);begin Inherited Create(AName);end;转自:http://zhidao.baidu.co 阅读全文
posted @ 2013-06-26 11:56 万大侠 阅读(411) 评论(0) 推荐(0) 编辑
摘要: inherited就是调用祖先类的函数,如果不带参数就是默认调用同名函数如果带参数则表明子类中的函数个数可能比祖先类要多取其中的几个参数传过去例如祖先类有个函数 Create(AName:string);子类有个函数 Create(AName:string;AComponent:TObject);override;那么子类的Create函数内就可以这样调用祖先类:procedure TAClass.Create(AName:string;AComponent:TObject);begin Inherited Create(AName);end;InheritedKeywordUsed t... 阅读全文
posted @ 2013-06-26 11:42 万大侠 阅读(3562) 评论(0) 推荐(0) 编辑