We are upgrading our Active Widget from 1.0 to 2.6. I updated all references from grid.js/css to aw.js/css, and I still can't get it to work. Are there any other references that I need to change for these versions?
Please help, I'm completely new to this, and my familiarity with JavaScript is limited.
Hi Alex,
Thanks for the response. I just saw it couple days ago, and have been trying to do the corresponding updates.
This is the former piece of code I had:
var header = new Active.Templates.Header;
header.setEvent("onmousedown", function(event){
if (event.button == 2 ) {
//showmenu(event,cmenu);
}
else {
this.setClass("header", "pressed");
this.timeout(function(){this.action("columnSort")});
}
});
grid.setTemplate("top/item", header);
I changed it as follows:
var header = new AW.Grid.Header;
/*
header.setEvent("onmousedown", function(event){
if (event.button == 2 ) {
//showmenu(event,cmenu);
}
else {
this.setClass("header", "pressed");
this.timeout(function(){this.action("columnSort")});
}
});
*/
grid.setTemplate("top/item", header);
And I stated getting the following error, both before and after I commented out the 'header.setEvent' code block:
this[set] is not a function
http://>server>/scripts/ActiveWidgets/runtime/lib/aw.js
Line 26
I'm not sure what the issue is here. Am I selecting the wrong function to set my headers?
Never mind. I stripped down a lot of the old code to just get the base grid going. I can build on that :-)
Yes, this is exactly what I was going to say - its better to start with a minimal working example and then gradually migrate missing features.
As for debugging I would suggest pausing on exception and then looking up call stack until you see which part of your code triggered it.
This topic is archived.