A question that comes up a lot in REALbasic is
What is the difference between the Self and Me keywords?Everybody eventually thinks they have it sorted out in their own minds but it's surprising how many of us then find we're wrong.
I think that essentially it goes something like this:
Self and Me always refer to the same thing, except in the specific instance where you are editing the method handlers of a class in a Window. In those circumstances, Self refers to the item you're editing (the window) and Me refers to the class instance which exposes the method.The best advice I ever received on this was (I think) from Mars.
If you want to know what Self refers to, while you're coding, look up at the top of the IDE.
If the title bar says
Realbasic - [Untitled] - Class1then Self refers to Class1. On the other hand, if the title bar says
Realbasic - [Untitled] - Window1then Self refers to Window1