Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by A. Vato on Sep 05, 2007 15:31
open dhtmlx forum
Hi there, I quite often get the alert message "Stack overflow at line: 1515" when I select single cells or whole blocks. The copy functionality is given, but I can't find a way to avoid this message. (Browser: Internet Explorer 6.0) Thanks for your assistance


Answer posted by Stanislav on Sep 05, 2007 18:04
Problem not reconstructable locally.

Please try to use attached js file instead original one ( it has some related fixes but not sure is it solve your problem or not )
If problem still occurs for you - please provide any kind of sample where problem can be reconstructed.
Attachments (1)
Answer posted by A. Vato on Sep 18, 2007 16:34
I'm sorry, the attached file didn't bring a solution for the problem. It's hard to find any regularity in its behaviour but I have listed some points I noticed:

- The alert "Stack Overflow at line 1515" is shown when you release the mousebutton after selecting a block of rows or single cells (even one single cell!)
- The problem occurs more often by using the left than the right mousebutton, except for pushing the right mousebutton somewhere in the table, hold it pressed and release somewhere outside the table.
- I'm using Internet Explorer 6.0.2900. In Firefox the problem doesn't come up, however it's a project requirement to use IE in this version. Web framework is Struts 1.2.7.

----
For example I use a simple table with eight columns and a selection/copy functionality like this:

    <script src="${pageContext.request.contextPath}/js/xGrid/dhtmlXCommon.js"></script>
    <script src="${pageContext.request.contextPath}/js/xGrid/dhtmlXGrid.js"></script>
    <script src="${pageContext.request.contextPath}/js/xGrid/dhtmlXGridCell.js"></script>
    <script src="${pageContext.request.contextPath}/js/xGrid/dhtmlXGrid_selection.js"></script>
    <script src="${pageContext.request.contextPath}/js/xGrid/dhtmlXGrid_nxml.js"></script>
    <script src="${pageContext.request.contextPath}/js/xGrid/dhtmlXGrid_srnd.js"></script>
    <script>
        var xmlString = '<bean:write name="myForm" property="itemListXML" filter="false"/>';   
    </script>

   
    <body oncontextmenu="return false">

    ...
                                                            <div id="mygridbox" style="width:840px; height:355px;"/>


        mygrid = new dhtmlXGridObject('mygridbox');
        mygrid.setImagePath("${pageContext.request.contextPath}/img/xGrid/");
        mygrid.setSkin("light");
        mygrid.setHeader('A,B,C,D,E,F,G,H');
        mygrid.setInitWidths("135,133,110,85,125,*,0,0");
        mygrid.setColAlign("left,center,left,left,left,left,center,center");
        mygrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro");

        mygrid.enableRowsHover(true, "TABLERowMouseOver");
        mygrid.enableDistributedParsing(true,25);
        mygrid.enableSmartXMLParsing(true);
        mygrid.enableSmartRendering(true);
        mygrid.init();
       
        mygrid.loadXMLString(xmlString);
        mygrid.enableBlockSelection();

        mygrid.attachEvent("onKeyPress",onKeyPressed);
        mygrid.attachEvent("onRowSelect",onRowSelect);
   

    function onRowSelect(rid, cid){       
         showItem(mygrid.cells(rid,6).getValue(),mygrid.cells(rid,7).getValue());
        }

    function onKeyPressed(code,ctrl,shift){
        if(code==67&&ctrl){
            mygrid.setCSVDelimiter("\t");
            mygrid.copyBlockToClipboard();
        }
        return true;
        }

    function showItem(selectedId,selectedId2) {
                                                    document.all.myForm.selectedId.value=selectedId;
        document.all.myForm.selectedId2.value=selectedId2;
        document.all.myForm.submit();
        }


Answer posted on Sep 21, 2007 17:42
Problem confirmed and fixed, fix will be available as part of next version (1.5)