Thank you so much! I kept thinking of this as a chain with hierarchy and
missed that bro2 was an equal member of both. (Plus, old parts of my brain
still thinks instance means the in memory instantiation of a class).
On Thu, Dec 16, 2010 at 5:54 PM, Joe Groff <[email protected]> wrote:
> On Dec 16, 2010, at 10:28 PM, Jim mack wrote:
>
> I haven't figured out how to debug/step into inheritance chains/method
> order choosing.
>
>
> bro2 is both a member of power1 (through "dad") and power2. There's no
> hierarchical relationship implied between "power1" and "power2" (both
> classes are open union classes and neither class is necessarily a subset of
> the other), so when you invoke "content" on a bro2, it's ambiguous as to
> whether the "power1" or "power2" method should be called. In ambiguous
> cases, the union/mixin dispatch currently dispatches on the first
> asciibetical class for which it finds a method, in this case "power1". To
> get the behavior you want, you need to make power2 a member of power1,
> thereby mirroring the tuple inheritance hierarchy in the mixin hierarchy:
>
> MIXIN: power1
> MIXIN: power2
>
> TUPLE: dad ;
> TUPLE: bro1 < dad ;
> TUPLE: bro2 < dad ;
>
> INSTANCE: power2 power1
>
> INSTANCE: dad power1
> INSTANCE: bro2 power2
>
> Since "power2" is now explicitly a subset of "power1" it will be treated as
> more specific, and "power2" methods will override "power1" methods.
>
> -Joe
>
>
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
Jim
"I'm for extending the working Medicare program for our seniors all the way
back to contraception, so Americans can concentrate on living their lives
without fear of changing a job, going bankrupt from deductibles or fighting
HMO bureaucracy."
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk