I'm toying around with MAPluggableAccessor. While
I really like
to introduce some kind of delegated descriptions it doesn't
work that easy. I'm not really familiar with caching of the
magritte descriptions. My problem is that I'm operating on
a MAContainerComponent using childAt: .
I don't have such a method.
The children are
detected by =. The MAPluggableAccessor implements equality based
on the equality of the read and write accessors. But these are
blocks and return false if compared.
Indeed, identity of descriptions is currently established with the accessors.
The whole identity thing is problematic and caused some lengthy
discussion dating back to ESUG 2006 in Brussels. At the time I started
with Magritte the accessor seemed to be a decent choice, however later
it became clear that it does not work well for accessors like the
MAPluggableAccessor or MANullAccessor.
Today I think the identity should be established using a special
object, by default it would just use the identity of the description.
If the developer provided an UUID in the code it would use that
instead. Although such an approach does not sound very OO, it is
probably the only way to ensure object identity even if the
description changes completely (including the accessor and the class)
or when identity has to be preserved across multiple images.
So I'm wondering what is the intended of the
class. I can get
it to work if I'm caching the accessor inside the component.
But maybe it is supposed to work different.
I don't understand the above part.
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch