ups disculpa la tardanza ...
bien aqui esta
Código python:
Ver originalclass ProjectExplorer(wx.TreeCtrl):
def __init__(self, parent, id):
wx.TreeCtrl.__init__(self, parent, id, style=wx.TR_DEFAULT_STYLE)
self.projectdirty = False
self.root = None
self.close = False
class program(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, size=(850, 700))
self.n = 0
self.Center()
self.x = 0
self.count = 0
self.Edt = prop(self, -1)
#*******************************
self.nb = nb(self, -1)
self.man = wx.aui.AuiManager()
self.man.SetManagedWindow(self)
#..........................
def project_open(self, project_file):
try:
input = open(project_file, 'r')
self.ProjectExplorer.DeleteAllItems()
self.project_file = project_file
name = input.readline().replace ('\n', '')
self.SetTitle(name)
self.root = self.ProjectExplorer.AddRoot(name)
self.activeitem = self.root
for line in input.readlines():
self.ProjectExplorer.AppendItem(self.root, line.replace('\n', ''))
input.close()
self.ProjectExplorer.Expand(self.root)
StyleEditor.Clear()
StyleEditor.Enable(False)
projectdirty = False
except IOError:
pass
el DeleteAllItems()
y luego el add root
son los que me dan problemas primero uno y luego el otro
Código:
>>>
Traceback (most recent call last):
File "C:\Users\oscars\Desktop\oskdocumentos\wxpyide\wxPyIDE.py", line 1174, in OnAProject
self.project_open(dlg.GetPath())
File "C:\Users\oscars\Desktop\oskdocumentos\wxpyide\wxPyIDE.py", line 1197, in project_open
self.ProjectExplorer.DeleteAllItems()
TypeError: unbound method DeleteAllItems() must be called with ProjectExplorer instance as first argument (got nothing instead)
>>>
no se como pasar eventos de clase en clase