Re: Reconciling DataContexts

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Sun Oct 21 2007 - 16:20:46 EDT

  • Next message: Kevin Menard: "Re: Reconciling DataContexts"

    On 20/10/2007, at 11:40 PM, Kevin Menard wrote:

    > On 10/20/07 4:36 AM, "Andrus Adamchik" <andru..bjectstyle.org> wrote:
    >
    >> On Oct 19, 2007, at 10:58 PM, Kevin Menard wrote:
    >>
    >>> By hiding this in a setter, it may be possible to unregister
    >>> the old
    >>> object first, thereby limiting the growth.
    >>
    >> Not a good idea. Consider this:
    >>
    >> 1: BType blocal = (BType) a.getObjectContext().localObject
    >> (b.getObjectId(), b);
    >> 2: a.setSomething(blocal );
    >> 3: a.setSomething( (BType) a.getObjectContext().localObject
    >> (b1.getObjectId(), b1));
    >> 4. blocal.doSomething();
    >
    > I guess I don't see that being distinctly different from the following
    > non-Cayennish code:
    >
    > 1) BType b = a.getSomeB();
    > 2) a.setSomeB(b1);
    > 3) BType b1 = a.getSomeB();
    > 4) b.doSomething();

    If this is something you'd prefer to do, Kevin, then I'd suggest
    adjusting your velocity templates to achieve what you'd like for the
    varying setter methods and so on. This is the usual place to do any
    such abstractions.

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Sun Oct 21 2007 - 16:21:26 EDT