Board index » delphi » OOP (TP7): "THIS"?

OOP (TP7): "THIS"?

Hi,
My Problem is to find out the Pointer of the Object whichs procedure I
am (to give it to a global procedure for example). I know in C there
is a function "This", but i found nothing equal in TP?
Please help
        bye, Patrik
 

Re:OOP (TP7): "THIS"?


Quote
In article <4gsqff$...@Dortmund.Germany.EU.net> Patrik Stellmann wrote:
>Hi,
>My Problem is to find out the Pointer of the Object whichs procedure I
>am (to give it to a global procedure for example). I know in C there
>is a function "This", but i found nothing equal in TP?

Self and pointer = @Self

        ...red

Re:OOP (TP7): "THIS"?


Quote
(Patrik Stellmann) writes:
>Hi,
>My Problem is to find out the Pointer of the Object whichs procedure I
>am (to give it to a global procedure for example). I know in C there
>is a function "This", but i found nothing equal in TP?
>Please help
>    bye, Patrik

It's called "Self" in TP. It's not a pointer but rather the object itself.
So to pass a pointer you use "@Self".

Hope this helps
Frank

Other Threads