On 21-09-15 02:46, Peter Uhnák wrote:
So far so simple... however what I don't understand:
1. What if I want to have different descriptions for the same attribute?
For example in some views the email is required and in others it is not.
asMagritteMorph is just the quick and dirty variant for
On 21-09-15 12:09, Peter Uhnák wrote:
Thank you Stephan, I think the image is becoming much clearer.
However I still don't understand how SRP applies here:
Person>>asNameMagritteMorph
^(self magritteDescription select: [:each | each label = 'Name'])
asMorphOn: self
Surely this is
Thank you Stephan, I think the image is becoming much clearer.
However I still don't understand how SRP applies here:
> Person>>asNameMagritteMorph
> ^(self magritteDescription select: [:each | each label = 'Name'])
> asMorphOn: self
Surely this is responsibility of the tool that needs
Peter Uhnák writes:
> ~~~
> Person>>descriptionEmail
>
> ^ MAStringDescription new
> label: 'Email';
> accessor: #email;
> beRequired;
> yourself
> ~~~
to complement Stephan's answer, you can add properties
Hi,
I'm trying to wrap my head around Magritte but I am failing hard...
Imagine I have object with three attributes.
~~~
Object subclass: #Person
instanceVariableNames: 'name age email'
~~~
Now the normal way would be to add magritte descriptions...