3.2.0

IE bug with setSelectorWidth()

I have created my own control and part of the control is a grid. When I create the blank grid at startup IE spins out of control chewing up ALL available memory and clock cycles when it hit this line of my code:

getTemplate("DGrid").setSelectorWidth(45);


In FireFox 1.5 everything works great. But IE simply has a fit on this line. I know that I shouldn't have it in my code yet because the command doesn't work yet (I hope you knew about that Alex? setSelectorWidth does nothing), but I prepare my code for the final release where I am planning it will be fixed and working.
Jim Hunter
December 14,
This bug still is in RC1. It is so bad, that IE will simply crawl up and die if you try and use it in a compund control. I have included code below to demonstrate the problem. Run the following code in FF and you will see that the call to setSelectorWidth does not work at all but at least the grid still displays. In IE, nothing gets rendered and IE spins out of control eating up memory as fast as it can. You need Task Manager to kill it. Any thoughts Alex on if this is going to get fixed for final release? Here is the code, try it with the setSelectorWidth line commented out and then try it with the line in place:

<html>
<head>
<script src="../../runtime/lib/aw.js"></script>
<link href="../../runtime/styles/xp/aw.css" rel="stylesheet" />
</head>
<body>
<script>
  a = new AW.UI.Grid;
  var myHeader = ["Number","Description"];
  var myData = [
        ["1","Description 1"], 
        ["2","Description 2"], 
        ["3","Description 3"], 
        ["4","Description 4"],
        ["5","Description 5"], 
        ["6","Description 6"], 
        ["7","Description 7"], 
        ["8","Description 8"], 
        ["9","Description 9"], 
        ["10","Description 10"], 
        ["11","Description 11"], 
        ["12","Description 12"], 
        ["13","Description 13"], 
        ["14","Description 14"], 
        ["15","Description 15"]
    ];
AW.UI.myDispatch = AW.System.Control.subclass();
AW.UI.myDispatch.create = function()
{
  var obj = this.prototype;
  with (obj)
  {
    setStyle("height", 500);
    //setStyle("width", 700);
    setStyle("position", "absolute");
  }
  obj.defineTemplate("Header", new AW.HTML.DIV);
  with (obj.getTemplate("Header"))
  {
     setStyle("width", "100%");
     setStyle("height", 30);
     setStyle("background", "lightblue");
  }
  obj.defineTemplate("AuxUDV", new AW.HTML.DIV);
  with (obj.getTemplate("AuxUDV"))
  {
     setStyle("height", 30);
     setStyle("background", "lightyellow");
     setStyle("width", "100%");
  }
  obj.defineTemplate("NavBar", new AW.HTML.DIV);
  with (obj.getTemplate("NavBar"))
  {
     setStyle("width", "100%");
     setStyle("height", 30);
     setStyle("background", "lightgreen");
  }
  obj.defineTemplate("TheGrid", new AW.UI.Grid)
  with (obj.getTemplate("TheGrid"))
  {
     setStyle("height", 200);
     setStyle("width", "100%");
     setCellText(myData);
     setRowCount(myData.length);
     setHeaderText("Header");
     setColumnCount(2);
     setSelectorVisible(true);
     //setSelectorWidth(75);  // <- remove this line and test in IE
  }
  obj.setContent("html", function(){
    return this.getHeaderTemplate() + 
            this.getAuxUDVTemplate() + 
            this.getNavBarTemplate() +
        this.getTheGridTemplate();
  })
}
  a = new AW.UI.myDispatch;
  a.setStyle("width", 600);
  a.setId("WWW");
  document.write(a);
</script>
</body>
</html>
Jim Hunter (www.FriendsOfAW.com)
February 7,
Jim,

Even with the line in question commented out .... clicking on a header to sort a column will lock up IE. In FF it will sort.
Rob Francis
February 7,
I guess I didn't see that problem as I don't test column sorting since we don't allow it. I guess there are still more problems then we know about.
Jim Hunter (www.FriendsOfAW.com)
February 7,

This topic is archived.

See also:


Back to support forum