How to execute somegrid.loadXML asynchronously?

I’m maintaining jquery+dhtmlx code, and author used to load .xml content to a dhtmlx grid with the following way:

somegrid.loadXML ("url", function () { ... } );
additional_code;

I put

calls everywhere and I noticed that the execution is passed to

immediately and the content of the callback function is executed after that. I don’t have problem with this asynchronous approach, but I’m receiving error:

Unable to get property '_childIndexes' of undefined or null reference

and I suspect, that the error is beacause of that. But how to make this function call as synchronous?

Thx

Please, try to call your additional code in the callback functiion:
somegrid.loadXML (“url”, function () {
additional_code();
} );

Actually, there’s no “additional_code” in the source… But I’m receiving the DHTMLX error. And I think the reason is that execution is still inside of the callback function, and DHTMLX suppose a state that is not already reached…

anyway, loadXML() is already deprecated?

docs.dhtmlx.com/api__dhtmlxcombo_loadxml.html

and we cannot call load() synchronously?

anyway, loadXML() is already deprecated?
yes, loadXML() method is deprecated now.
Actually load() method is similar to the loadXML() but allows to load not only from the xml.

and we cannot call load() synchronously?
yes, it also right.

If the problem still occurs for you pleas,e provide with any kind of sample of your using code so I can suggest a solution.