Hello all,
I am building a form that consists of two components, e.g. House and
Person. For each of these, when a new one is created I register it.
I have a manager class that displays these using:
MAToManyRelationDescription new
classes: (Array with: House);
label: 'Houses';
accessor: (MASelectorAccessor new
readSelector: #houses;
writeSelector: nil;
yourself);
default: Array new;
priority: 20;
yourself
People is similar. The Manager class is a form, but with no buttons
as it is only needed to let the add buttons work on these relation
descriptions. The accessor shown here, houses just calls "House
instances" to get currently registered houses. I subclass
MACheckedMemento and create a custom memento that simply overrides the
#push: method to see if the object is new (no members will be set) and
if so, registers the object after called "super push:".
Everything is fine except for Houses, after I create a new hause the
main display always shows 2. If I leave the page and visit new I see
only one. I have looked around but I dont see how this is happening.
Any ideas?