Grammalecte  Check-in [0cf6f12f52]

Overview
Comment:[lo] lexicon editor: empty regex patterns if wrong
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | lo
Files: files | file ages | folders
SHA3-256: 0cf6f12f521336bc3fc4b8002943f60ece227f0aa204bc0178b85d0d9a288c7b
User & Date: olr on 2018-04-13 14:32:09
Original Comment: [lo] empty regex patterns if wrong
Other Links: manifest | tags
Context
2018-04-13
14:50
[lo][bug] lexicon editor: don’t forget to commit change to save parameters check-in: 9e62ff2f56 user: olr tags: trunk, lo
14:32
[lo] lexicon editor: empty regex patterns if wrong check-in: 0cf6f12f52 user: olr tags: trunk, lo
14:18
[lo] lexical editor: display error message if wrong regex check-in: e0e5594553 user: olr tags: trunk, lo
Changes

Modified gc_lang/fr/oxt/DictOptions/SearchWords.py from [ab6e7468d1] to [2ba69c4e6b].

205
206
207
208
209
210
211

212
213
214
215
216

217
218
219
220
221
222
223
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225







+





+







        sFlexPattern = self.xFlexion.Text.strip()
        sTagsPattern = self.xTags.Text.strip()
        try:
            if sFlexPattern:
                re.compile(sFlexPattern)
        except:
            MessageBox(self.xDocument, self.dUI.get("regex_error_flexion", "#err"), self.dUI.get("error", "#err"), nBoxType=ERRORBOX)
            sFlexPattern = ""
        try:
            if sTagsPattern:
                re.compile(sTagsPattern)
        except:
            MessageBox(self.xDocument, self.dUI.get("regex_error_tags", "#err"), self.dUI.get("error", "#err"), nBoxType=ERRORBOX)
            sTagsPattern = ""
        xGridDataModel = self.xGridModel.GridDataModel
        xGridDataModel.removeAllRows()
        for i, aEntry in enumerate(self.oSpellChecker.select(sFlexPattern, sTagsPattern)):
            xGridDataModel.addRow(i, aEntry)
            i += 1
            if i >= 2000:
                break