Hi, I wonder why the onLoad callback function are called in the reverse order. When I register callback c1 and later register c2 - c2 is called before c1. This leads to some problems - for example in html head tab I register a callback that does some general stuff, and later I optionally register a second callback that depends on the first one. This obviously does not work in current rico version. How about replacing pop() call with shift() when iterating through callback array? Or at least giving an option in onLoad function - either we want to append our callback to the end of the callback chain or place it at the beginning. Best regards, Jacek
on 02.11.2007 16:33
on 04.11.2007 03:06
Excellent suggestion! I've replaced pop with shift in the processing of
callbacks. I've also changed onLoad as follows:
onLoad: function(callback,frontOfQ) {
if (frontOfQ)
this.onLoadCallbacks.unshift(callback);
else
this.onLoadCallbacks.push(callback);
this.checkIfComplete();
},
Thanks,
Matt
on 05.11.2007 08:41
Matt, Thank you for your quick answer and for including the fix. Greetings, Jacek


