Hi, thanks for the explanations (this was not really what I was asking for,
but anyway... :)
Actually I understood what was going on. In the other case I was listening
to the "changeBubble" event, and it happens that this event gets fired by a
change in an array if the corresponding array property apply method fires
"_applyEventPropagation". This is because the first time this is fired, a
listener is registered on the array object which watches out for changes.
So basically, it was a matter of difference between "change" (which must
really be registered on the property) and "changeBubble". Things are clear
for me now. Again, thanks.
Jean-Noel
On Fri, Sep 11, 2009 at 12:49 PM, MartinWittemann <[email protected]
> wrote:
>
> Hello,
>
> ok, i'll give my best in explaining our thoughts.
>
> There are two events that can be fired by a data array.
>
> The first is named "changeLength" and will be fired every time the length
> of
> the array changes. But as you can imagine, thats not enough to get all
> changes like a reordering. The "changeLength" event is a plain event, so no
> data is attached.
>
> The second event is the "change" event which should be fired on every
> change
> of the array. This event is a data event and contains a map as data
> containing four parameters:
> * start
> * end
> * type (which is a string out of [add, remove, order])
> * items: an plain array containing the removed items for example (this one
> is extremely experimental!!!)
>
> But I guess what you are talking about is the mechanism of the bubbling
> events. The array supports the bubble events (at least it should) so it
> depends of your class if it uses the MEventBubbling mixin. But this usually
> only is interessting for the objects in the array and not the one above. So
> i don't know why its working in you other case but as far as i see, it
> should not work like you expected.
>
> Best,
> Martin
>
>
>
>
> Jean-Noël Rivasseau wrote:
> >
> > Hi, this is for Martin ;)
> >
> > Could you explain me exactly how the events triggered by qx.data.Array
> > work
> > exactly?
> >
> > I have a class that has a qx.data.Array property. I want to listen to all
> > the events that change the qx.data.Array contents in any way. The
> > following
> > will work:
> >
> > myObject.getMyProperty().addListener('change", callback);
> >
> > but I thought I could do a myObject.addListener("changeMyProperty");
> >
> > if of course the changeMyProperty event was defined for myProperty.
> > However,
> > this does not work in this case... and what is really bogging me is that
> I
> > have the *exact* similar case with another class, and for the other
> class,
> > this works (eg, the apply method is triggered every time the array
> changes
> > in any way...)
> >
> > So I am confused, what is the proper way of using all this?
> >
> > Jean-Noel
> >
> >
> ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > 30-Day
> > trial. Simplify your report design, integration and deployment - and
> focus
> > on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/Events-triggered-by-a-qx-data-Array-change-tp3621252p3624981.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel