From: Alex T. <al...@tw...> - 2005-06-07 23:08:14
|
kim...@ya... wrote: >Alex, > >Your code crashed the same way on my system. As soon >as I hit a key at the entry field, the program >crashed. > > > Well, I'm pretty baffled - so I really hope someone else can chime in with an idea. In the meantime, I'll bash on, hoping I don't ask too many stupid questions or make too many stupid suggestions. Earlier, you said: >"Do the Pythoncard samples work OK ?" > >Yes. > Could you verify that the simpleBrowser sample works properly, including typing a URL into the URL field at the top ? Looking at the code involved in the traceback, I would think tuple should be safe enough - so let's see what it's being called on. Could you change lines 335-341 of PythonCard/event.py from > class KeyEvent(Event): > def decorate(self, aWxEvent, source): > aWxEvent = Event.decorate(self, aWxEvent, source) > > # this is basically the same block as MouseEvent.decorate > # but it seems wrong to have KeyEvent be a subclass of MouseEvent > aWxEvent.position = tuple(aWxEvent.GetPosition()) to class KeyEvent(Event): def decorate(self, aWxEvent, source): aWxEvent = Event.decorate(self, aWxEvent, source) # this is basically the same block as MouseEvent.decorate # but it seems wrong to have KeyEvent be a subclass of MouseEvent mypoint = aWxEvent.GetPosition() print mypoint aWxEvent.position = tuple(mypoint) and see if that tells us anything. If it fails one the aWxEvent.GetPosition() then let's print out the aWxEvent and see what's in it. btw - you said you were using latest download of PythonCard, 0.81 but latest should be 0.82 (I think). Could you possibly run the codeEditor (or resourceEditor) and click on Help/About PythonCard.... and check what it says; my system has PythonCard version: 0.8.2 wxPython version: 2.5.3.1 Python version: 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] Platform: win32 which doesn't make it clear, but it's actually wxPython wx-2.5.3-msw-ansi where you have a unicode version. (shouldn't matter - but it's the biggest difference I've seen in our version so far) Thanks, -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.6.2 - Release Date: 04/06/2005 |