#subclassResponsibility is defined in Object.
A good way to find this out is to
 - select 'subclassResponsibility' with the mouse
 - type Control-M
Control-M asks for a list of the iMplementors of the method.
Control-N asks for a list of the seNders of the message.

This particular method just raises an exception.
It is how you define what some languages call an "abstract method";
a method whose *interface* is defined in the current class
but whose *implementation* is deferred to subclasses.

I can't help you with #session except to suggest that it is
probably defined in some superclass.  In the browser button bar
between the upper and lower panes you may see
(*) Flat ( ) Hier
Clicking on Hier will change the class pane (2nd from the left,
upper level) to an indented list, making it easy to see what
the superclass chain is.

On Sun, 13 Dec 2020 at 08:21, g_patrickb--- via Pharo-users <
pharo-users@lists.pharo.org> wrote:

> I understand if you have Class A with methods p and q that you can call q
> from p doing:
>
> self q
>
> But there are some cases where a method doesn’t exist but self is still
> used. I found a tutorial on creating a Reddit type app and it had a .mcz
> which I loaded.
>
> Here is an example from Class StLoggedInComponent and method refreshReport:
>
> self report rows: (self session user tasks select: self filterBlock).
>
> There is a method ‘report’ so I understand that, but there is no method
> named ‘session’ so what is the use of self?
>
> And Class StDatabase has method ‘updateTask:’ has:
>
> self subclassResponsibility.
>
> But no method called ‘subclassResponsibility’ exists in the Class.
>
> Also, Class StLoggedInComponents has method ‘testTasks’ with this:
>
> ^ self class testTasks
>
> What is ‘self class’?
>
> Thank you.
>

Reply via email to