multisash appears broken in 2.5.3

It appears that multisash is broken in version 2.5.3. The SetSaveData functions of the MultiSash and MultiViewLeaf classes no longer work properly. After some digging around I determined that the string representation of the class produced in GetSaveData can no longer be parsed properly by SetSaveData. I have modified the two functions in question so as to provide a fix. The solution appears to work but I really don’t know enough about the surrounding code to say it will work 100% of the time so you may need to embelish or reconsider the code provided. The code below is an excerpt from multisash.py. I have left the old code in place as comments and the new code is preceeded with the ‘–’ symbol.

From MultiSash

def SetSaveData(self,data):

dChild = data[’_defChild’]

mod = dChild.split(’.’)[0]

– _dChild = data[’_defChild’]
– dChild = _dChild.split(’’’)[1].split(’’’)[0]
– index = dChild.rfind(’.’)
– mod = dChild[:index]
exec ‘import %s’ % mod
self._defChild = eval(dChild)
old = self.child
self.child = MultiSplit(self,self,wxPoint(0,0),self.GetSize())
self.child.SetSaveData(data[‘child’])
old.Destroy()
self.OnMultiSize(None)
self.child.OnSize(None)

From MultiViewLeaf

def SetSaveData(self,data):

dChild = data[‘detailClass’]

mod = dChild.split(’.’)[0]

– _dChild = data[‘detailClass’]
– dChild = _dChild.split(’’’)[1].split(’’’)[0]
– index = dChild.rfind(’.’)
– mod = dChild[:index]
exec ‘import %s’ % mod
detClass = eval(dChild)
self.SetDimensions(data[‘x’],data[‘y’],data[‘w’],data[‘h’])
old = self.detail
self.detail = MultiClient(self,detClass)
dData = data.get(‘detail’,None)
if dData:
if hasattr(self.detail.child,‘SetSaveData’):
attr = getattr(self.detail.child,‘SetSaveData’)
if callable(attr):
attr(dData)
old.Destroy()
self.detail.OnSize(None)

Thanks,
Vince Thomasino
CTO
Sovoz Inc.