Hi, I'm making a log viewer application, which receives a Log Message from a Device and show it in a grid. When a new log is received, a new row is added in to the list and MakeCellVisible is called to make the new cell visible (I'm adding the code snippet at the end of the mail).
1. Now if I'm sending logs repeatedly and hence calling MakeCellVisible for the new row again and again, after about 1500 logs Python is getting crashed with error "Python.exe has encountered a problem and need to be closed". 2. I further checked the issue using trace option "python -m trace --trece <Python file name>" and found that the problem is in "MakecellVisible". Last instruction which was executed was "return _grid.Grid_MakeCellVisible(*args, **kwargs)" 3. Therefore I wrote my own pyhon code for MakeCellVisible (Logic was stolen from WxPython source code :-)). but now it crashed on Scroll. And since Scroll uses and updates Pos variable using pionter, I can not write a pyton code for it So I'm back to square one please suggest if some one has ever faced this problem, or can sugest me a work arround. Code Snippet #---------------------------------------------------------------------------------------------------------- while not self.needKill: try: win32pipe.ConnectNamedPipe( self.pipeHandle ) if self.needKill == True: win32pipe.DisconnectNamedPipe( self.pipeHandle ) break hr, v = win32file.ReadFile( self.pipeHandle, 1024, None ) win32pipe.DisconnectNamedPipe( self.pipeHandle ) if ((self.App.pause != True) & (self.App.stop != True)): self.App.window.grid.InsertRows(self.App.GridRow, 1, False) self.App.GridRow += 1 self.i = self.App.GridRow - 1 self.App.window.grid.MakeCellVisible(self.i, 0) #------------------------------------------------------------------------------------------------------------- Also another observation is that this code is crashing only n TFT monitors not on CRT monitors, probably becase of screen size. Thaks, Anurag
_______________________________________________ ActivePython mailing list ActivePython@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython