Hi guys,

I'm trying to populate a listbox with some stored preferences but it 
doesn't work if I use inserItemAt only if I use appendItem, but 
appendItem is giving me a unordered list that changes its order 
everytime it is populated, so I decided to use insertItemAt...

The code I am using is something like this...

            var signatures = 
prefService.getBranch("").getChildList("myExt.signatures", {});

            for (var i in signatures) {
                signaturesList.insertItemAt(i, 
myPref.getCharPref(signatures[i]) );
            }

and the error is

Error: uncaught exception: [Exception... "Component returned failure 
code: 0x80004005 (NS_ERROR_FAILURE) [nsIListBoxObject.getItemAtIndex]"  
nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: 
chrome://global/content/bindings/listbox.xml :: getItemAtIndex :: line 
481"  data: no]

Someone can help me?

Thanks in advance

--
Renato Rodrigues
http://www.renatorodrigues.com
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to