corrently persist names
This commit is contained in:
parent
e9d1909987
commit
78def7f8c2
18
scripting.py
18
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
|
||||
|
|
Loading…
Reference in a new issue