There is an implementation of memento in magritte if you want to get some inspiration.
Which works for a normal model object. But a facade wouldn't be storing it's values in instance variables. It would be proxying for one or more underlying model objects and so would a copy of that object. So rather than have the memento just be a simple copy of the object,
A memento does not have to be a copy, it can just have the same api and store the info in a dict and once validated update the model.
I want it to be a copy of the object and intercept the relevant accessors (I have a list) and redirect them to a dictionary. Then after validation, etc. the updateRefModel selector on the memento would update the underlying model or facade. Thus it would work for both normal models and facades.
you can compile on the fly new methods and use instVarAt:.... but I would not use meta programming in simple model. Stef
Elliot