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):
|
class Typeable(TPrs):
|
||||||
def InitTransient(self):
|
def InitTransient(self):
|
||||||
self.steditTypein = Stedit()
|
self.steditTypein = Stedit()
|
||||||
def PersistStedit(self):
|
|
||||||
assert self.FPersist()
|
|
||||||
try:
|
|
||||||
del self.steditTypein
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
self.steditTypein = Stedit()
|
|
||||||
def GetStTypein(self):
|
def GetStTypein(self):
|
||||||
st = self.steditTypein.GetValue()
|
st = self.steditTypein.GetValue()
|
||||||
return None if st == "" else st
|
return None if st == "" else st
|
||||||
|
@ -250,12 +243,19 @@ class SyntDesc(Synt):
|
||||||
class SyntName(Synt):
|
class SyntName(Synt):
|
||||||
def InitPersistent(self):
|
def InitPersistent(self):
|
||||||
Synt.InitPersistent(self)
|
Synt.InitPersistent(self)
|
||||||
self.PersistStedit()
|
self.st = ""
|
||||||
|
def InitTransient(self):
|
||||||
|
Synt.InitTransient(self)
|
||||||
|
self.SetStTypein(self.st)
|
||||||
def Project(self, pcur):
|
def Project(self, pcur):
|
||||||
PwTypein(pcur.PwHoriz(self), self.St(), self)
|
PwTypein(pcur.PwHoriz(self), self.St(), self)
|
||||||
def St(self):
|
def St(self):
|
||||||
return self.GetStTypein()
|
return self.GetStTypein()
|
||||||
|
def HandleTypeinKey(self, key):
|
||||||
|
val = Synt.HandleTypeinKey(self, key)
|
||||||
|
self.st = self.GetStTypein()
|
||||||
|
return val
|
||||||
|
|
||||||
class SyntExpr(Synt):
|
class SyntExpr(Synt):
|
||||||
rgclsSyntOp = []
|
rgclsSyntOp = []
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in a new issue