From: Kevin A. <ka...@us...> - 2004-05-10 01:17:47
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21760 Modified Files: model.py Log Message: reworked runtime window variables and loading Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.169 retrieving revision 1.170 diff -C2 -d -r1.169 -r1.170 *** model.py 10 May 2004 00:45:17 -0000 1.169 --- model.py 10 May 2004 01:17:38 -0000 1.170 *************** *** 309,314 **** self.resource = resource.ResourceFile(aFileName).getResource() - self.debug = 0 - self.frame = None self.frameClass = frameClass self.pw = None --- 309,312 ---- *************** *** 318,325 **** self.namespaceFrame = None self.namespace = None - self._showProperties = showProperties - self._showMessages = showMessages - self._showShell = showShell - self._showNamespace = showNamespace # KEA 2001-08-11 # if any of the debug windows are going to be used then --- 316,319 ---- *************** *** 329,333 **** # if it seems strange self._showDebugMenu = showProperties or showMessages or showShell or showNamespace or showDebugMenu - ###self._debugMenu = debug.DebugMenu(self) # KEA 2004-01-02 # moved colourdb initialization to work with wxPython 2.5 --- 323,326 ---- *************** *** 338,408 **** def showPropertyEditor(self): ! if self._showDebugMenu: ! bg = self.getCurrentBackground() ! position = configuration.getOption('propertyEditorPosition') ! size = configuration.getOption('propertyEditorSize') ! self.pw = debug.PropertyEditor(bg, -1, "Property Editor", ! position, size, ! parentApp=self) ! self.pw.displayComponents(bg.components) ! self.pw.Show(self._showProperties) def showMessageWatcher(self): ! ! if self._showDebugMenu: ! bg = self.getCurrentBackground() ! position = configuration.getOption('messageWatcherPosition') ! size = configuration.getOption('messageWatcherSize') ! # KEA frame isn't bound to anything, so I think this is supposed ! # to be debug.MessageWatcher( self._iterator.getCurrentBackground() ! # instead of debug.MessageWatcher( self.frame ! # however I don't know what happens once there are ! # multiple backgrounds ?! ! # perhaps there should always be a hidden parent PythonCard app ! # window that all other windows are children of ?! ! # KEA also changed mw to self.mw ! # KEA 2001-08-06 ! # there is a bug in destroying the windows, so mw is still a child ! # of the main window, while shell and pw are not ! self.mw = debug.MessageWatcher(bg, -1, "Message Watcher", ! position, size, ! parentApp=self) ! self.mw.Show(self._showMessages) def showShell(self): ! ! # KEA 2002-06-27 ! # the startup time associated with the shell ! # is noticeable even on a fast machine ! # so I'm going back to making it optional ! # there is a utility routine for an app to be able to ! # make the shell available without having it shown by ! # default ! if self._showDebugMenu: ! # KEA see comments in showMessageWatcher about frames ! bg = self.getCurrentBackground() ! position = configuration.getOption('shellPosition') ! size = configuration.getOption('shellSize') ! self.shellFrame = debug.PyCrustFrame(bg, -1, 'Shell', ! position, size, ! parentApp=self) ! self.shellFrame.Show(self._showShell) ! #if self._showDebugMenu: ! # self.shellFrame.Show(self._showShell) ! EVT_RUN_PYCRUSTRC(self, self.OnRunPycrustrc) ! wx.PostEvent(self, wxRunPycrustrcEvent()) def showNamespace(self): ! ! if self._showDebugMenu: ! # KEA see comments in showMessageWatcher about frames ! bg = self.getCurrentBackground() ! position = configuration.getOption('namespacePosition') ! size = configuration.getOption('namespaceSize') ! self.namespaceFrame = debug.PyCrustNamespaceFrame(bg, -1, 'Namespace Viewer', ! position, size, ! parentApp=self) ! self.namespaceFrame.Show(self._showNamespace) def _initBackgrounds(self, aResource): --- 331,372 ---- def showPropertyEditor(self): ! bg = self.getCurrentBackground() ! position = configuration.getOption('propertyEditorPosition') ! size = configuration.getOption('propertyEditorSize') ! self.pw = debug.PropertyEditor(bg, -1, "Property Editor", ! position, size, ! parentApp=self) ! self.pw.displayComponents(bg.components) ! self.pw.Show(configuration.getOption('showPropertyEditor')) def showMessageWatcher(self): ! bg = self.getCurrentBackground() ! position = configuration.getOption('messageWatcherPosition') ! size = configuration.getOption('messageWatcherSize') ! self.mw = debug.MessageWatcher(bg, -1, "Message Watcher", ! position, size, ! parentApp=self) ! self.mw.Show(configuration.getOption('showMessageWatcher')) def showShell(self): ! bg = self.getCurrentBackground() ! position = configuration.getOption('shellPosition') ! size = configuration.getOption('shellSize') ! self.shellFrame = debug.PyCrustFrame(bg, -1, 'Shell', ! position, size, ! parentApp=self) ! self.shellFrame.Show(configuration.getOption('showShell')) ! EVT_RUN_PYCRUSTRC(self, self.OnRunPycrustrc) ! wx.PostEvent(self, wxRunPycrustrcEvent()) def showNamespace(self): ! bg = self.getCurrentBackground() ! position = configuration.getOption('namespacePosition') ! size = configuration.getOption('namespaceSize') ! self.namespaceFrame = debug.PyCrustNamespaceFrame(bg, -1, 'Namespace Viewer', ! position, size, ! parentApp=self) ! self.namespaceFrame.Show(configuration.getOption('showNamespace')) def _initBackgrounds(self, aResource): *************** *** 411,417 **** self.backgrounds.append(bg) - def getBackgrounds(self): - return self.backgrounds - # wxWindows calls this method to initialize the application def OnInit(self): --- 375,378 ---- *************** *** 420,432 **** self._initBackgrounds(self.resource) ! self.showPropertyEditor() ! self.showMessageWatcher() ! self.showShell() # KEA pyCrust support ! self.showNamespace() # KEA pyCrust support ! return 1 def getCurrentBackground(self): ! #return self._iterator.getCurrentBackground() ! return self.getBackgrounds()[0] # RDS - new API --- 381,393 ---- self._initBackgrounds(self.resource) ! if self._showDebugMenu: ! self.showPropertyEditor() ! self.showMessageWatcher() ! self.showShell() # KEA pyCrust support ! self.showNamespace() # KEA pyCrust support ! return True def getCurrentBackground(self): ! return self.backgrounds[0] # RDS - new API *************** *** 804,815 **** def loadShell(self): if self.application.shell is None: - temp = self.application._showDebugMenu - self.application._showDebugMenu = 1 self.application.showShell() - self.application._showDebugMenu = temp - # KEA 2003-07-22 - # I don't think this is needed since showShell will - # run the pycrustrc.py file(s) - #self.application.OnRunPycrustrc(None) def loadNamespace(self): --- 765,769 ---- *************** *** 819,826 **** return if self.application.namespace is None: - temp = self.application._showDebugMenu - self.application._showDebugMenu = 1 self.application.showNamespace() - self.application._showDebugMenu = temp def setName( self, aString ) : --- 773,777 ---- |