Index:
[thread]
[date]
[subject]
[author]
From: Garrett Mitchener <wgm2@duke.edu>
To :
Date: 01 Apr 1999 19:34:59 -0500
Re: this
Michael Abernethy <mna@duke.edu> writes:
> "this" can be rather helpful when you're dealing with lots of classes
> and windows. It can help you keep track of what you're doing to what.
> Technically, I think "this" is a pointer to the current class, and this
> can be helpful when you're trying to pass the current class to another class.
> For example:
>
> myOtherClass.doSomething(this);
>
> will pass your current class to myOtherClass.
>
You're right in concept but the term "current class" is sort of
confusing. What I'm sure you mean is that when you invoke a method on
an object
myWhatsit.doStuff()
the method doStuff has to have access to myWhatsit, sort of the
"current instance of class such-and-such."
-- Garrett :-)
Index:
[thread]
[date]
[subject]
[author]