Qustion about validate: has:
Chris Muller
chris at funkyobjects.org
Fri Aug 11 14:49:40 UTC 2006
It's not testing respondsTo:. Its testing that the Magma programmer
remembered to *override* #maWantsPreSerialization or
#maWantsPostMaterialization to answer true.
I must admit I care much for the implementation, but this is just a
validation-check during initialization of your system, not something
called over and over. Nevertheless, if anyone has any ideas of a
better way I'm open..
- Chris
--- keith hodges <keith.hodges at warwick.ac.uk> wrote:
> I found this code but I am wondering why not use #respondsTo:
>
> Keith
>
> ====
>
> validate: className has: selector
>
> (Smalltalk hasClassNamed: className) ifFalse: [ "No validation
> needed" ^ self ].
> ((Smalltalk at: className) basicNew perform: selector)
> ifFalse:
> [ MaObjectSerializationUserError signal: 'Need to
> implement
> ', selector, ' on ', className ]
>
>
>
>
> ____________________________________________________
>
> Yahoo! Photos is now offering a quality print service from just 7p a
> photo. http://uk.photos.yahoo.com
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>
>
More information about the Magma
mailing list