Hello 

All this is explained in the Mooc (with mutliple videos and gradually) 
and Pharo by Example chapter.

Pay attention you do not need to understand the metaclass core to program in 
Pharo.
This is just for fun and a bonus. This is why in general I do not show this 
diagram directly. 

Check the mooc videos we designed based on more than 10 years of experience
teaching Pharo to people.

S


> On 12 Dec 2020, at 20:20, 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.
> 

--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Reply via email to