Grammalecte  Check-in [31905c2c2f]

Overview
Comment:[graphspell][js] console.log() for debugging
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256: 31905c2c2f74dda88a95c85975f1b3425f8d384f94930a456c2a998c1332f8ad
User & Date: olr on 2018-08-07 09:03:22
Other Links: manifest | tags
Context
2018-08-07
12:40
[tb] code cleaning: fix import (not necessary for TextDecoder, TextEncoder) check-in: 8ea07ff627 user: olr tags: tb, trunk
09:03
[graphspell][js] console.log() for debugging check-in: 31905c2c2f user: olr tags: graphspell, trunk
09:02
[tb][bug] lexicon editor: wrong filename check-in: db6c099b46 user: olr tags: tb, trunk
Changes

Modified graphspell-js/helpers.js from [dded3e5e90] to [6ccb02c60d].

    18     18       },
    19     19   
    20     20       loadFile: function (spf) {
    21     21           // load ressources in workers (suggested by Mozilla extensions reviewers)
    22     22           // for more options have a look here: https://gist.github.com/Noitidart/ec1e6b9a593ec7e3efed
    23     23           // if not in workers, use sdk/data.load() instead
    24     24           try {
           25  +            console.log("loadFile: " + spf);
    25     26               let xRequest;
    26     27               xRequest = new XMLHttpRequest();
    27     28               xRequest.open('GET', spf, false); // 3rd arg is false for synchronous, sync is acceptable in workers
    28     29               xRequest.overrideMimeType('text/json');
    29     30               xRequest.send();
    30     31               return xRequest.responseText;
    31     32           }

Modified graphspell-js/ibdawg.js from [c644dcfbc9] to [624ac3b2e2].

   101    101                   oData = JSON.parse(helpers.loadFile(sURL));
   102    102               } else {
   103    103                   oData = param1;
   104    104               }
   105    105               Object.assign(this, oData);
   106    106           }
   107    107           catch (e) {
          108  +            console.error(e);
          109  +            console.log("path: " + sPath);
          110  +            console.log("dic:" + param1.slice(0, 1000));
   108    111               throw Error("# Error. File not found or not loadable.\n" + e.message + "\n");
   109    112           }
   110    113           /*
   111    114               Properties:
   112    115               sName, nCompressionMethod, sHeader, lArcVal, nArcVal, sByDic, sLang, nChar, nBytesArc, nBytesNodeAddress,
   113    116               nEntry, nNode, nArc, nAff, cStemming, nTag, dChar, nBytesOffset,
   114    117           */