X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=tree.py;h=82aada2f2ecde984b0a5e8a073bc1687a290e023;hp=3e05977c829471db6beaa80840a1431b3ef5358d;hb=a0535abfee0078cf316bdd7cafcaa04805c086e9;hpb=f24454f5d67c621e94a76410a1e8e9a83c0c138b diff --git a/tree.py b/tree.py index 3e05977..82aada2 100644 --- a/tree.py +++ b/tree.py @@ -697,11 +697,16 @@ class LeftTree(CT.CustomTreeCtrl): def OnTgenCompute(self, evt): corpus = self.page.corpus tgenpath = os.path.join(self.page.parametres['pathout'], 'tgen.csv') - self.page.parametres['tgenpath'] = tgenpath - tgen = TGen(path = tgenpath, encoding = self.parent.syscoding) - self.page.parametres['etoiles'] = self.page.etoiles - TgenSpec(self.parent, corpus, self.page.parametres) - TgenLayout(self.page) + if not os.path.exists(tgenpath) : + message = wx.MessageDialog(self.parent, _(u"No TGen yet !"), style = wx.ICON_EXCLAMATION | wx.OK) + message.ShowModal() + message.Destroy() + else : + self.page.parametres['tgenpath'] = tgenpath + tgen = TGen(path = tgenpath, encoding = self.parent.syscoding) + self.page.parametres['etoiles'] = self.page.etoiles + TgenSpec(self.parent, corpus, self.page.parametres) + TgenLayout(self.page) def OnExportClasses(self, event): corpus = self.page.corpus