RE: [PyCrust] Thoughts...
Brought to you by:
pobrien
|
From: Kevin A. <al...@se...> - 2001-08-11 00:07:18
|
> [mailto:pyc...@li...]On Behalf Of Robin
> Dunn
> 3. It would be nice if Shell (or maybe ShellWindow) derived from Editor.
> That way it could more easily be used as a wxWindow, moved, given
> to sizers,
> etc. Unfortunatly doing
>
> class ShellWindow(PyCrustShell.Shell, PyCrustEditor.Editor):
> ...
>
> doesn't quite work because of name clashes between the classes.
This may not be directly relevant to what Robin is asking, but this is what
I'm currently doing in debug.py of the PythonCardPrototype package.
class PyCrustFrame(wxMiniFrame):
def __init__(self, parent, ID, title, pos, size, parentApp):
wxMiniFrame.__init__(self, parent, ID, title, pos, size,
style=wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ)
parentApp.shell = Shell(editorParent=self)
# KEA this is temporary until we decide what reference
# we want here
parentApp.shell.interp.locals['pcapp'] = parentApp
self.parentApp = parentApp
EVT_CLOSE(self, self.onCloseMe)
def onCloseMe(self, event):
self.Show(false)
in model.py, the window is invoked with
def showShell( self ) :
if debug.PYCRUST_FOUND and self._showShell :
# KEA see comments in showMessageWatcher about frames
bg = self._iterator.getCurrentBackground()
position = Configuration().getOption('shellPosition')
size = Configuration().getOption('shellSize')
self.shellFrame = debug.PyCrustFrame(None, -1, 'Shell',
position, size,
parentApp=self)
self.shellFrame.Show(true)
ka
|