PDA

View Full Version : [OPEN-1094] listening of DataProxy events DirectStore load events fails



steffen.rahn
1 Jul 2010, 9:21 PM
The Topic say it all, so to keep it short: I've tried it twice and both times all load events fails. I've got a little showcase online with a direct link to the code:

EDIT: links removed due to the bug definition below...

Animal
1 Jul 2010, 11:43 PM
What exactly "fails"? What goes wrong, where?

Animal
1 Jul 2010, 11:44 PM
I just looked at the source

DirectProxy does not fire a load event.

(on edit): Oops! It does! I searched for 'load' and the code has "load"

Good case for code standardization!

steffen.rahn
1 Jul 2010, 11:49 PM
According to the API DirectProxy extends DataProxy which fires load events. So DirectProxy should...?

"EDIT"
I tested it with 3.1 and 3.2.x

In both cases no load events fired, as you can see in the simple direct showcase

Animal
2 Jul 2010, 12:25 AM
Weird. It's just load which doesn't work.

I just typed this into the firebug console of a random examples page



Ext.data.DataProxy.addListener('load', function (proxy, action) {
console.log('load');
});
Ext.data.DataProxy.addListener('write', function (proxy, action) {
console.log('write');
});
p = new Ext.data.DataProxy();
p.fireEvent("load");
p.fireEvent("write");


And only got the "write" logged!

steffen.rahn
2 Jul 2010, 12:28 AM
My talking ... ;)

Animal
2 Jul 2010, 12:32 AM
Only a few are relayed through the class

The source has



// relay each proxy's events onto Ext.data.DataProxy class for centralized Proxy-listening
Ext.data.DataProxy.relayEvents(this, ['beforewrite', 'write', 'exception']);


I don't know why only that subset of instance events are relayed through the class.

Dev team?