but layoutProperties are not immutable so if you receive an instance of 
NullLayoutProperties (singleton), and you do something like this: 

myMorph cellInset: 5, you has to check for correct properties anyway… that’s 
why is implemented as this: 

cellInset: aNumber
        "Layout specific. This property specifies an extra inset for each cell 
in the layout."
        self assureTableProperties cellInset: aNumber.
        self layoutChanged.

I do not think answering a null object here is good… it will cause infinite 
problems and you will need to check for correct properties anyway.

In any case, I would reject such a change (specially at this moment).

Esteban


> On 01 Feb 2016, at 08:20, stepharo <steph...@free.fr> wrote:
> 
> A good solution is to have
>    share by default and instance-based when needed.
> 
> For that
>    use a classVariable to instantiate only one NullLayoutProperties
>    use an instance variable that points to it by default
> 
>    one demand change the instance variable to point to a new created instance
> 
> => you can remove all the ifNil:
> 
> 
> 


Reply via email to