Delphi can call the method of the parent class through inherited, but it does not provide a method to directly call the parent class of the parent class (the grandfather class). The implementation is as follows through a flexible method:
Assuming the parent class It is TFather, the grandpa class TGrand, calls the Write method of the grandpa class:
1
2
3
4
5
6
7
8
9
|
type TWriteProc= procedure of< /code> var WriteProc:TWriteProc ; .... code> TMethod(WriteProc).Code:[emailprotected] . Write ; TMethod(WriteProc).Data:=Self; < code class="delphi spaces">
WriteProc; |
https://www.cnblogs.com/hezihang/p/4139656.html
1
2
3
4
5
6
7
8
9
|
type TWriteProc= procedure of code> Object ; var WriteProc:TWriteProc; < /div>
.... TMethod(WriteProc).Code:[email protected] . Write ; TMethod(WriteProc).Data:=Self; WriteProc; |
1
2
3
4
5
6
7
8
9
|
type TWriteProc= procedure of Object ; < /div>
var WriteProc:TWriteProc; .... TMethod(WriteProc).Code:[emailprotected] . Write ; < code class="delphi spaces">
TMethod(WriteProc).Data:=Self; WriteProc; |
1
2
3
4
5
6
7 < /div>
8
9
|
type TWriteProc= procedure of Object ; var WriteProc:TWriteProc; .... < code class="delphi plain">TMethod(WriteProc).Code:[email protected] . Write ; TMethod(WriteProc).Data:=Self; WriteProc; |
1
2< /p>
3
4
5
6
7
8
9
type
TWriteProc=
procedure
of
Object
;
var
WriteProc:TWriteProc;
.. ..
TMethod(WriteProc).Code: [email protected]
.
Write
;
TMethod(WriteProc).Data:=Self;
WriteProc;
type
< /code>
TWriteProc=
procedure
of
Object
;
var
< p>
WriteProc:TWriteProc;
....
TMethod(WriteProc).Code:[ email protected]
.
Write
;
TMethod(WriteProc).Data:=Self;
WriteProc;
WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3167 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC