Re: [Pharo-users] externalizing Magritte descriptions and partial forms

2015-09-21 Thread Stephan Eggermont
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

Re: [Pharo-users] externalizing Magritte descriptions and partial forms

2015-09-21 Thread Stephan Eggermont
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

Re: [Pharo-users] externalizing Magritte descriptions and partial forms

2015-09-21 Thread Peter Uhnák
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

Re: [Pharo-users] externalizing Magritte descriptions and partial forms

2015-09-21 Thread Damien Cassou
Peter Uhnák writes: > ~~~ > Person>>descriptionEmail > > ^ MAStringDescription new > label: 'Email'; > accessor: #email; > beRequired; > yourself > ~~~ to complement Stephan's answer, you can add properties

[Pharo-users] externalizing Magritte descriptions and partial forms

2015-09-20 Thread Peter Uhnák
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...