If I want to do...
===
formDescriptionNewUserRegistration
| loginDesc |
loginDesc := self description copy.
(loginDesc atLabel: 'Username')
beWriteable;
beRequired;
addCondition: [ :newUserName |
self client login isLoginUsernameAvailable: newUserName ]
labelled: 'already taken'.
^ loginDesc
=====
The copy is needed, because I dont want to modify the cached version,
that everyone else is using. However, I dont think that the children are
copied, they remain the same objects.
Could/should they be copied in MAContainer-#postCopy ?
Keith
ok since children is a sorted collection, that makes copying needlessly
expensive for this use case.
I have adopted the following idiom.
#formDescriptionForgottonPassword
^ self description copy
atLabel: 'E-mail' modify: [ :d | d componentClass:
MATextInputComponent ];
atLabel: 'Username' modify: [ :d | d beWriteable ];
atLabel: 'Password' modify: [ :d | d beHidden ];
yourself
Keith