[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
self
Reference to current object in methods
------------------------------------------------------------------------------
Description:
self is a local instance variable which is automatically defined in
all methods. It contains a reference to the current object, ie. the
object which received the message which invoked the current method.
For example, a statement such as obj:open() will normally invoke
the open() method. Inside that method, the self variable will
contain a reference to the same object referred to by obj.
Since self is typically used heavily inside methods, a special
operator, the double-colon (::) has been provided as a shorthand
for sending message to self. See the :: entry for more
information.
See Also:
::
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson