From 78def7f8c282608a8a5f80184869696fd7c1d845 Mon Sep 17 00:00:00 2001 From: Jeremy Penner Date: Tue, 20 Sep 2011 08:38:41 -0400 Subject: [PATCH] corrently persist names --- scripting.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripting.py b/scripting.py index ea6421b..5923e5a 100644 --- a/scripting.py +++ b/scripting.py @@ -95,13 +95,6 @@ class RtypeAny(Rtype): class Typeable(TPrs): def InitTransient(self): self.steditTypein = Stedit() - def PersistStedit(self): - assert self.FPersist() - try: - del self.steditTypein - except: - pass - self.steditTypein = Stedit() def GetStTypein(self): st = self.steditTypein.GetValue() return None if st == "" else st @@ -250,12 +243,19 @@ class SyntDesc(Synt): class SyntName(Synt): def InitPersistent(self): Synt.InitPersistent(self) - self.PersistStedit() + self.st = "" + def InitTransient(self): + Synt.InitTransient(self) + self.SetStTypein(self.st) def Project(self, pcur): PwTypein(pcur.PwHoriz(self), self.St(), self) def St(self): return self.GetStTypein() - + def HandleTypeinKey(self, key): + val = Synt.HandleTypeinKey(self, key) + self.st = self.GetStTypein() + return val + class SyntExpr(Synt): rgclsSyntOp = [] @classmethod