Hi all, 1 month ago I worked in project, where I wrote custom widget(table with header sort event).
And I downloaded very pretty javascript library(sorttable, http://www.kryogenix.org/code/browser/sorttable/), but I couldn't understand, why when I include this library in page with Ms Ajax control's, exceptions try to fuck my browser and brain.
After google, I found blog of japan guy(don't remember link, butthankful for him) some information about forEach method, that's uses in MS Ajax and sorttable library. For fixing this bug, you may try to replace forEach method in sorttable library to simple for loop, example (in init()):
/*forEach(document.getElementsByTagName('table'), function(table) {
if (table.className.search(/\bsortable\b/) != -1) {
var index = table.id.indexOf("_header");
var sortingFields = table.id.substring(0, index);
sorttable.makeSortable(table, sortingFields);
}
}); */
for(i=0;i < document.getElementsByTagName('table').length;i++)
{
table=document.getElementsByTagName('table')[i];
if (table.className.search(/\bsortable\b/) != -1) {
var index = table.id.indexOf("_header");
var sortingFields = table.id.substring(0, index);
sorttable.makeSortable(table, sortingFields);
}
};
That's all, thanks for reading.
среда, 30 апреля 2008 г.
Day of qt
Not so long ago I've start to write different programmes based on c++ qt framework.
It's very great full, very thoughtful, very similar to C#, java. But Qt haven't event model or delegate model. But it have more flexible model, SIGNALS and SLOTS.
For example:
You have model (A) and (B) and (C)
(A) have to send data to model (B) and (C).
and you write:
QObject::connect(A, SIGNAL(sendDataSignal()),
B, SLOT( )));
You can also subscribe for example: signal to signal, signal to slot. It's build a chain.
It hasn't long been seen nothing convenient.
It's very great full, very thoughtful, very similar to C#, java. But Qt haven't event model or delegate model. But it have more flexible model, SIGNALS and SLOTS.
For example:
You have model (A) and (B) and (C)
(A) have to send data to model (B) and (C).
and you write:
QObject::connect(A, SIGNAL(sendDataSignal(
B, SLOT(
You can also subscribe for example: signal to signal, signal to slot. It's build a chain.
It hasn't long been seen nothing convenient.
Подписаться на:
Комментарии (Atom)