Hi,
I encountered an error when attach DataProcessor to my scheduler, below is the JavaScript error message that I get.
Error: anObj.parentObject is undefined
Source File: 10.0.0.123/ls-script/dhtmlxDataP … ocessor.js
Line: 470
I get this error because scheduler.parentObject is undefined. How to fix this problem?
Below the script that I use,
function doOnloadScheduler() {
scheduler.config.dblclick_create=false;
scheduler.config.drag_create=false;
scheduler.config.time_step = “5”;
scheduler.config.show_loading=true;
scheduler.config.multi_day = true;
scheduler.config.xml_date=“%d/%m/%Y %H:%i”;
// Timeline Script
scheduler.locale.labels.timeline_tab = “Timeline”;
scheduler.locale.labels.section_custom = “Assign to”;
var sections=[
{key:“AT”, label:“AT=ANTHONY TEO
(View members)”},
{key:“AG”, label:“AG=ANASTASIA GABY
(View members)”},
{key:“EP”, label:“EP=EDWIN PUTRA
(View members)”},
{key:“BT”, label:“BT=BUDI TANJUNG
(View members)”},
{key:“RT”, label:“RT=ROB TSANG
(View members)”},
{key:“DX”, label:“DX=DANIEL X
(View members)”}
];
scheduler.createTimelineView({
name: “timeline”,
x_unit: “hour”,
x_date: “%H:%i”,
x_step: 6,
x_size: 28,
second_scale: {
x_unit: “day”,
x_date: “%d/%m/%Y”
},
y_unit: sections,
y_property: “section_id”,
dy: 30,
render: “bar”
});
scheduler.config.lightbox.sections=[
{name:“description”, height:130, map_to:“text”, type:“textarea” , focus:true},
{name:“custom”, height:23, type:“select”, options:sections, map_to:“section_id” },
{name:“time”, height:72, type:“time”, map_to:“auto”}
];
scheduler.init(“myscheduler”,null,“timeline”);
scheduler.load(“www_lj_test_schdl.xmldata”);
myDataProcessor = new dataProcessor(“www_lj_test_schdl.save_data”);
myDataProcessor.enableDebug(false);
myDataProcessor.enableDataNames(true);
myDataProcessor.setUpdateMode(“cell”); //available values: cell (default), row, off
myDataProcessor.setTransactionMode(“GET”,true);
myDataProcessor.init(myscheduler);
} // end of doOnloadScheduler