Don't you need FORWARD CLASS(SUPER) to get both invoked?

Staffan



On Mon, May 13, 2013 at 9:21 PM, Oliver Sims <
oliver.s...@simsassociates.co.uk> wrote:

> **
> I have classes and a couple of mixins as in the following test program:
>
> c = .MyClass~new
> c~doIt
> ::class MyClass subclass Class1
> ::class Class1 subclass Class2 inherit MixinA MixinB
> ::class Class2
> ::class MixinA mixinclass Class2
>   ::method doIt;  say "MixinA caught it."
> ::class MixinB mixinclass Object
>   ::method doIt;  say "MixinB caught it."
> The result is "MixinA caught it".
>
> However, if I change the order of "inherit" in the Class1 directive to:
>
>  ::class Class1 subclass Class2 inherit MixinB MixinA
>
> then the result is "MixinB caught it".
>
> However, I sort of expected that both MixinA *and* MixinB would be
> invoked.
>
> Is this working to spec? Reading the ooRexx Reference, it seemed to
> suggest (p.84) that the result would be to invoke each of the mixins in
> turn:
>
> "If you specify the INHERIT option, the class inherits instance methods
> and class methods from the classes iclasses in their order of appearance
> (leftmost first). This is equivalent to sending a series of INHERIT
> messages to the class object, with each INHERIT message (except the first)
> specifying the preceding class in iclasses as the classpos argument."
>
>
> The result from the above code suggests that only the first mixin in the
> mixin list is invoked.
>
>  Many thanks.
>
> --
> Oliver Sims
>
>
>
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> _______________________________________________
> Oorexx-users mailing list
> Oorexx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-users
>
>
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to