[Seaside] Extending WAModelProxy to handle the proxying of methods with 2 or more arguments..

Martin J. Laubach mjl at laubach.at
Mon Jul 31 09:45:51 UTC 2006


|  Anyone care to steer me in the right direction such that this method
|  can handle methods that look something like :
| 
|  MyClass>>UpdateMyArrayAt: myIndex with: myValue

  The short answer: It can't. The proxy is a really simple minded thing
that just assumes: a selector with one argument is a setter and sets
an instance variable, and there is a corresponding getter (same selector
without arg). Thus it intercepts #foo: and #foo and simulates setting
and getting.

  Quite obviously this won't work right for more elaborate getter/setter
scenarios that do more, like "insert stuff in a Collection".

  In that case you'd probably need to make a deep copy and build a proxy
that keeps a log of all actions so it can replay them against the original
on commit.

	mjl


More information about the Seaside mailing list