corrently persist names

This commit is contained in:
Jeremy Penner 2011-09-20 08:38:41 -04:00
parent e9d1909987
commit 78def7f8c2

View file

@ -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,11 +243,18 @@ 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 = []