var allRows = this.getTbodyEl().rows;
for (var i = allRows.length - 1; i >= 0; i--){
var thisRowID = allRows[i].id;
// Clean up any existing Drag instances
if (myDTDrags[thisRowID]) {
myDTDrags[thisRowID].unreg();
delete myDTDrags[thisRowID];
}
// Create a Drag instance for each row
myDTDrags[thisRowID] = new YAHOO.util.DDProxy(thisRowID);
};
I can't figure out why, but the above code is not yielding a DDProxy object for each row in my table. I have verified that the DDProxy code is all loaded and running properly by passing a string reference to a DOM element:
myDTDrags[thisRowID] = new YAHOO.util.DDProxy('yui-rec30');
This makes the corresponding row draggable as expected! I have also verified, using typeof, that the value of thisRowID is indeed of the type 'string' AND that the string contains the id of appropriate row elements.
What have I missed?