[Solved]Problem with Zotero.selectItems ??

Hi everybody,

I'm working in a translator that scrape the result of a specific recherch (multiple). but, my problem is when the number of results is more than 20 the Zotero.selectItems (or something else ??) is blocked.
Is it an argument of the Zotero.selectItems that i must change ??

Thanks !!!
  • In fact, after continuing testing, i've found that the problem, don't come really from the zotero.selectItems. Some explanations:
    1-I use a xml var that i fill with a doget and it contains results of the recherche.
    2- I loop on that xml var for building the pids var (it's the argument i use for the zotero.selectItems).
    The trouble is that the extarnal loop want not do more than 20 iterations. This is the simplified code:

    [code]
    for(var i=0; i< temp.lastIndexOf("docFreq="); i++)
    {
    if(temp.substr(i,14) == "escapedValue=\"")
    {
    //the url wich give details of a book
    var newURI = url.substring(url.indexOf("http");

    Zotero.wait();
    Zotero.Utilities.HTTP.doGet(newURI+id+".xml?fragment=null", function(text3) {
    var xml = new XML(text3);

    for(var i=0 ; i <xml.book.length() ; i++) {
    var book = xml.book[i];
    pids[cpt] = Zotero.Utilities.superCleanString(book.title.text().toString());
    cpt++;
    manageGlobal(text,cpt,pids,newURI,ids);
    }
    Zotero.done();
    })
    }
    }
    [code]

    It's on the function manageGlobal that i use Zotero.selectItems.
  • Can you post the full code and an example XML file gist.github.com and post a link here? I'll take a look at it-- it's hard to follow without fuller context.
  • The trouble is solved, in fact there's a problem with the framework I used (if you need more information see http://www.pleade.org).

    Some explanation:

    • In my loop I ask pleade for getting the data of a item; but pleade stop to answer after 20 iterations.

    • From that, the loop is blocked because it wait the answer from pleade !!!

    Thank you for your attention.

This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.