[Cuis-dev] Newbie ahead...

Hilaire Fernandes hilaire at drgeo.eu
Fri May 27 01:35:12 PDT 2022


Then you would/should wonder why in the message below it is written 
#TheBook and not TheBook?

One good reason is that at this message sent, the class TheBook is not 
know, does not exist. Cuis will have then good reason to complain about 
that. So we instruct about the name we want for this new class with a 
symbol (a constant string), so #TheBook. It could have been 'TheBook', 
but a constant is better.

A Symbol is always unique, execute&print the code below, and observe:

'The Book' == 'The Book' copy
#'The Book' == #'The Book' copy


Le 27/05/2022 à 10:18, Hilaire Fernandes a écrit :
> *Object*  subclass: #TheBook
> 	instanceVariableNames: ''
> 	classVariableNames: ''
> 	poolDictionaries: ''
> 	category: 'The-Cuis-Book'
>
> and not:
>
> *#Object*  subclass: #TheBook
> 	instanceVariableNames: ''
> 	classVariableNames: ''
> 	poolDictionaries: ''
> 	category: 'The-Cuis-Book'

-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220527/e87de8e9/attachment.htm>


More information about the Cuis-dev mailing list