Bruno, many thanks.
I guess I should upgrade to D6 then :)
best regards
"Bruno" <
[hidden email]> escribió en el mensaje
news:
[hidden email]...
> Martin Rubi escribió:
> > Is there a way to make any object be immutable in Dolphin 5 or Dolphin 6
?
> > (I'm mean without using some sort of wrapper)
> >
> > regards
> > martin
> >
> >
>
> In D6:
>
> anObject isImmutable: true.
>
> If the object has a collection you have to send the message to the
> collection too.
>
> Bank
> instVar: 'name address accounts'
>
> aBank isImmutable: true.
> aBank name: newName. " raise an exception "
> aBank addAccount: anAccount "no exception"
>
> addAccount: anAccount
>
> ^accounts add: anAccount
>
> regards bruno