Grammalecte  Check-in [187891a915]

Overview
Comment:[tb] lexicon editor: useless function
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tb | multid
Files: files | file ages | folders
SHA3-256: 187891a9158fa786bbd85a07a45b24137b42146b7aa1d0bb92815688820711b9
User & Date: olr on 2018-03-17 16:50:18
Other Links: branch diff | manifest | tags
Context
2018-03-17
16:51
[tb] lexicon editor: useless import check-in: ebf940de4a user: olr tags: tb, multid
16:50
[tb] lexicon editor: useless function check-in: 187891a915 user: olr tags: tb, multid
16:48
[tb] lexicon editor: export > use OS.File check-in: e376521f18 user: olr tags: tb, multid
Changes

Modified gc_lang/fr/tb/content/lex_editor.js from [911ddf9a93] to [0c72453f10].

482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
        enableElement("export_button");
    },

    import: function () {
        console.log("import");
    },

    export2: function () {
        let sJSON = JSON.stringify(this.oIBDAWG.getJSON());
        let xFile = new FileUtils.File("D:\\fr.personal.json");
        xFile.createUnique(FileUtils.NORMAL_FILE_TYPE, 644);
        xFileHandler = FileUtils.openSafeFileOutputStream(xFile, FileUtils.MODE_CREATE);
        console.log(xFileHandler);
    },

    export: function () {
        let sJSON = JSON.stringify(this.oIBDAWG.getJSON());
        let xFilePicker = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
        xFilePicker.init(window, "Enregistrer sous", Ci.nsIFilePicker.modeSave);
        xFilePicker.appendFilters(Ci.nsIFilePicker.filterAll | Ci.nsIFilePicker.filterText);
        xFilePicker.open(function (nReturnValue) {
            if (nReturnValue == Ci.nsIFilePicker.returnOK || nReturnValue == Ci.nsIFilePicker.returnReplace) {







<
<
<
<
<
<
<
<







482
483
484
485
486
487
488








489
490
491
492
493
494
495
        enableElement("export_button");
    },

    import: function () {
        console.log("import");
    },









    export: function () {
        let sJSON = JSON.stringify(this.oIBDAWG.getJSON());
        let xFilePicker = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
        xFilePicker.init(window, "Enregistrer sous", Ci.nsIFilePicker.modeSave);
        xFilePicker.appendFilters(Ci.nsIFilePicker.filterAll | Ci.nsIFilePicker.filterText);
        xFilePicker.open(function (nReturnValue) {
            if (nReturnValue == Ci.nsIFilePicker.returnOK || nReturnValue == Ci.nsIFilePicker.returnReplace) {
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
                    }
                });
                */
             }
        });
    }
}





const oLexiconTable = new Table("lexicon_table", ["Flexions", "Lemmes", "Étiquettes"], [10, 7, 10],"progress_lexicon", "num_entries");
const oGenWordsTable = new Table("generated_words_table", ["Flexions", "Étiquettes"], [10, 10], "progress_new_words");

oBinaryDict.load();
oBinaryDict.listen();
oGenerator.listen();







<
<









510
511
512
513
514
515
516


517
518
519
520
521
522
523
524
525
                    }
                });
                */
             }
        });
    }
}





const oLexiconTable = new Table("lexicon_table", ["Flexions", "Lemmes", "Étiquettes"], [10, 7, 10],"progress_lexicon", "num_entries");
const oGenWordsTable = new Table("generated_words_table", ["Flexions", "Étiquettes"], [10, 10], "progress_new_words");

oBinaryDict.load();
oBinaryDict.listen();
oGenerator.listen();