Hi,

@אריה גלזר: As Sanford recognized it correctly, ClassB extends ClassA
and ClassA provide an "toggle"-event which is called from the "click"-
Event added in the ctor of ClassB. ClassC just hold a collection of
ClassA/B references.

@Sanford: Yes, I'd notice also that the object is not the same object
I created and pass to the toggles-option of ClassC. But I couldn't
figure out how to solve this issue. And I didn't get the point of your
"B1.addEvent works" advice?

-- Christian

On Sep 7, 9:00 am, Sanford Whiteman <[email protected]>
wrote:
> > I got really confused from your example (you don't seem to be using A or B
> > at all, and I'm not sure why it is that you have them, especialy when C
> > doesn't extend A, so there is no way it will fire any event, which you also
> > fail to add).
>
> Well... B extends A, and C uses a collection of Bs.
>
> The   principal  problem  is  that  the  addEvent  to  the  Bs  within
> C::initialize is discarded; it's as if the Bs are passed byval, so the
> item.addEvent  is  useless.  B1.addEvent works, item.addEvent doesn't,
> even when item appears to reference B1.
>
> -- S.

Reply via email to