The typo in the setColors method has been fixed in CVS.  Do you still
have the addChild() problem in NS with the latest snapshot?

-- 
// Robert Rainwater

On 1/16/2001, 11:03:29 AM EST, Alan wrote about "[Dynapi-Help] List.js and List 
example bugs":

> I am somewhat new to the list, so forgive my ignorance in terms of file 
> maintenance protocol...

> I checked out the latest dynAPI from CVS yesterday and am preparing a demo 
> to present to my company on the virtues of using the DynAPI.

> I noticed what I think is a typo (bug) in dynapi.gui.list.js and in the 
> example, dynapi.gui.list.html.
> Can someone make the fixes and check-in these files?
> ----------------------
> dynapi.gui.list.js:
> In the function definition for List.setColors():
> List.prototype.setColors = 
> function(bg,bgRoll,bgSelect,textNormal,textRoll,textSelect){
>      var ls = this.listStyle;
>         // The line below is the original and seems incorrect.
>         // ls *is* a listStyle and does not have a field called listStyle:
>          // ls.listStyle.bg = bg||ls.bg;
>         // I replaced the line with the one below:
>          ls.bg = bg||ls.bg;
>         ....
> };
> ---------------------------
> dynapi.gui.list.html:
> In the example, NS Rollover colors don't work with the original 4 list 
> items, but do with any "added" items.  By adding the list to the DynAPI doc 
> *before* adding the listItems to the list, this is fixed:
> <script language="Javascript">
> DynAPI.onLoad = function() {
>    list = new List();
>         ...
>    // AM Widget fix: addChild() must precede list.add() for rollover to 
> work in NS:
>    DynAPI.document.addChild(list);
>    list.add('Item One', 1);
>    list.add('Item Two', 2);
>    list.add('Item Three', 3);
>    list.add('Item Four', 4);
>    // Originally the addChild line was here:
>    // DynAPI.document.addChild(list);
> }
> </script>
> -------------------------
> There is a further bug in running the example, which I have not yet caught, 
> but suspect is in list.js, but may lie deeper:
> In IE 5.0 (untested in 5.5 by me), the mouseout events do not work when the 
> pointer is over the text in the list.  In other words, the rollover color 
> (for the listItem) changes back to the normal bg color only when the 
> pointer is over the blank space in the list.  If the pointer is over the 
> text when it leaves the listItem, the rollover color remains.  Any ideas?

> Thanks, Alan


> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help



_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to