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

Reply via email to