Show More
@@ -575,7 +575,9 b' class IGridGrid(wx.grid.Grid):' | |||||
575 | frame = self.GetParent().GetParent().GetParent() |
|
575 | frame = self.GetParent().GetParent().GetParent() | |
576 | if frame.helpdialog: |
|
576 | if frame.helpdialog: | |
577 | frame.helpdialog.Destroy() |
|
577 | frame.helpdialog.Destroy() | |
578 |
frame.parent |
|
578 | app = frame.parent | |
|
579 | if app is not None: | |||
|
580 | app.result = result | |||
579 | frame.Close() |
|
581 | frame.Close() | |
580 | frame.Destroy() |
|
582 | frame.Destroy() | |
581 |
|
583 | |||
@@ -799,7 +801,25 b' class igrid(ipipe.Display):' | |||||
799 | This is a wx-based display object that can be used instead of ``ibrowse`` |
|
801 | This is a wx-based display object that can be used instead of ``ibrowse`` | |
800 | (which is curses-based) or ``idump`` (which simply does a print). |
|
802 | (which is curses-based) or ``idump`` (which simply does a print). | |
801 | """ |
|
803 | """ | |
802 | def display(self): |
|
804 | if wx.VERSION < (2, 7): | |
803 | app = App(self.input) |
|
805 | def display(self): | |
804 | app.MainLoop() |
|
806 | try: | |
805 | return app.result |
|
807 | # Try to create a "standalone" from. If this works we're probably | |
|
808 | # running with -wthread. | |||
|
809 | # Note that this sets the parent of the frame to None, but we can't | |||
|
810 | # pass a result object back to the shell anyway. | |||
|
811 | frame = IGridFrame(None, self.input) | |||
|
812 | frame.Show() | |||
|
813 | frame.Raise() | |||
|
814 | except wx.PyNoAppError: | |||
|
815 | # There's no wx application yet => create one. | |||
|
816 | app = App(self.input) | |||
|
817 | app.MainLoop() | |||
|
818 | return app.result | |||
|
819 | else: | |||
|
820 | # With wx 2.7 it gets simpler. | |||
|
821 | def display(self): | |||
|
822 | app = App(self.input) | |||
|
823 | app.MainLoop() | |||
|
824 | return app.result | |||
|
825 |
@@ -1,6 +1,9 b'' | |||||
1 | 2007-03-24 Walter Doerwald <walter@livinglogic.de> |
|
1 | 2007-03-24 Walter Doerwald <walter@livinglogic.de> | |
2 |
|
2 | |||
3 | * IPython/Extensions/igrid.py: Fix picking. |
|
3 | * IPython/Extensions/igrid.py: Fix picking. Using | |
|
4 | igrid with wxPyhon 2.6 and -wthread should work now. | |||
|
5 | igrid.display() simply tries to create a frame without | |||
|
6 | an application. Only if this fails an application is created. | |||
4 |
|
7 | |||
5 | 2007-03-23 Walter Doerwald <walter@livinglogic.de> |
|
8 | 2007-03-23 Walter Doerwald <walter@livinglogic.de> | |
6 |
|
9 |
General Comments 0
You need to be logged in to leave comments.
Login now