I am currently trying to port the app to os x. While doing this i wanted to post one mayor problem of wxpython (under osx):
if using StaticBoxSizer, all objects that are added must be created after the StaticBoxSizer.
this:
WELCOME_openLastEditedFilesBtn = wx.Button(welcomeScreenPanel, -1, 'Open Last Edited Files',size=(0,50))
if os.path.exists('lastFiles') and os.stat('lastFiles')[6]>0:
WELCOME_openLastEditedFilesBtn.Bind(wx.EVT_BUTTON,OpenLastEditedFiles)
else:
WELCOME_openLastEditedFilesBtn.Disable()
WELCOME_openFilesBtn = wx.Button(welcomeScreenPanel, -1, 'Open Files',size=(0,50))
WELCOME_openFilesBtn.Bind(wx.EVT_BUTTON,OpenFiles)
WELCOME_createNewFileBtn = wx.Button(welcomeScreenPanel, -1, 'Create New File',size=(0,50))
WELCOME_createNewFileBtn.Bind(wx.EVT_BUTTON,CreateNewFile)
WELCOME_buttonsSizer = wx.StaticBoxSizer(wx.StaticBox(welcomeScreenPanel),wx.VERTICAL)
WELCOME_buttonsSizer.Add((250,0))
WELCOME_buttonsSizer.Add(WELCOME_openLastEditedFilesBtn, 0, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5)
WELCOME_buttonsSizer.Add(WELCOME_openFilesBtn, 0, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5)
WELCOME_buttonsSizer.Add(WELCOME_createNewFileBtn, 0, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5)
must be changed to this:
WELCOME_buttonsSizer = wx.StaticBoxSizer(wx.StaticBox(welcomeScreenPanel),wx.VERTICAL)
WELCOME_openLastEditedFilesBtn = wx.Button(welcomeScreenPanel, -1, 'Open Last Edited Files',size=(0,50))
if os.path.exists('lastFiles') and os.stat('lastFiles')[6]>0:
WELCOME_openLastEditedFilesBtn.Bind(wx.EVT_BUTTON,OpenLastEditedFiles)
else:
WELCOME_openLastEditedFilesBtn.Disable()
WELCOME_openFilesBtn = wx.Button(welcomeScreenPanel, -1, 'Open Files',size=(0,50))
WELCOME_openFilesBtn.Bind(wx.EVT_BUTTON,OpenFiles)
WELCOME_createNewFileBtn = wx.Button(welcomeScreenPanel, -1, 'Create New File',size=(0,50))
WELCOME_createNewFileBtn.Bind(wx.EVT_BUTTON,CreateNewFile)
WELCOME_buttonsSizer.Add((250,0))
WELCOME_buttonsSizer.Add(WELCOME_openLastEditedFilesBtn, 0, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5)
WELCOME_buttonsSizer.Add(WELCOME_openFilesBtn, 0, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5)
WELCOME_buttonsSizer.Add(WELCOME_createNewFileBtn, 0, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5)
it would be great, if you could consider this, while you continue your work.