You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(116) |
Sep
(146) |
Oct
(78) |
Nov
(69) |
Dec
(70) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(188) |
Feb
(142) |
Mar
(143) |
Apr
(131) |
May
(97) |
Jun
(221) |
Jul
(127) |
Aug
(89) |
Sep
(83) |
Oct
(66) |
Nov
(47) |
Dec
(70) |
2003 |
Jan
(77) |
Feb
(91) |
Mar
(103) |
Apr
(98) |
May
(134) |
Jun
(47) |
Jul
(74) |
Aug
(71) |
Sep
(48) |
Oct
(23) |
Nov
(37) |
Dec
(13) |
2004 |
Jan
(24) |
Feb
(15) |
Mar
(52) |
Apr
(119) |
May
(49) |
Jun
(41) |
Jul
(34) |
Aug
(91) |
Sep
(169) |
Oct
(38) |
Nov
(32) |
Dec
(47) |
2005 |
Jan
(61) |
Feb
(47) |
Mar
(101) |
Apr
(130) |
May
(51) |
Jun
(65) |
Jul
(71) |
Aug
(96) |
Sep
(28) |
Oct
(20) |
Nov
(39) |
Dec
(62) |
2006 |
Jan
(13) |
Feb
(19) |
Mar
(18) |
Apr
(34) |
May
(39) |
Jun
(50) |
Jul
(63) |
Aug
(18) |
Sep
(37) |
Oct
(14) |
Nov
(56) |
Dec
(32) |
2007 |
Jan
(30) |
Feb
(13) |
Mar
(25) |
Apr
(3) |
May
(15) |
Jun
(42) |
Jul
(5) |
Aug
(17) |
Sep
(6) |
Oct
(25) |
Nov
(49) |
Dec
(10) |
2008 |
Jan
(12) |
Feb
|
Mar
(17) |
Apr
(18) |
May
(12) |
Jun
(2) |
Jul
(2) |
Aug
(6) |
Sep
(4) |
Oct
(15) |
Nov
(45) |
Dec
(9) |
2009 |
Jan
(1) |
Feb
(3) |
Mar
(18) |
Apr
(8) |
May
(3) |
Jun
|
Jul
(13) |
Aug
(2) |
Sep
(1) |
Oct
(9) |
Nov
(13) |
Dec
|
2010 |
Jan
(2) |
Feb
(3) |
Mar
(9) |
Apr
(10) |
May
|
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(44) |
May
(9) |
Jun
(22) |
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(3) |
Aug
(8) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bra...@om...> - 2005-06-13 20:51:50
|
I can't speak with any authority on this, but I don't think that PythonCard .81/.82 has been tested against Python 2.4.x. I ran into lots of problems with this and no one on the PythonCard list was able to help me with it, so I ended up continuing to use Python 2.3.5 for PythonCard .81 and .82. I was able to run PythonCard apps under 2.4.1, but got lots of exceptions and tracebacks in the terminal output, and as I recall Resource Editor was almost unuseable under Python 2.4.1. Of course, PythonCard is open source, so anybody with time to debug under Python 2.4.1 could do so to get to the bottom of the problem... My PythonCard app seems to work ok under Mac OS 10.4.1 and Python 2.3.5, along with wxPython 2.3.5 ansi (not Unicode). I doubt if 10.4 is the problem here. Arthur Elsenaar wrote on 06/07/2005 06:23:16 PM: > > Hi, > > trying to install PythonCard on OS X 10.4, but running into an import > problem. > > I installed python2.4.1, wxPython2.6, TigerPython24Fix and > TigerPython23Compat from Bob's packages page and added /usr/local/bin > to my path. Python2.4 runs fine and I can import wx fine, but not > pythoncard.. anyone know what can be wrong? > > Thanks, Arthur. > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users |
From: Alex T. <al...@tw...> - 2005-06-11 11:41:50
|
Nicolas Pinault wrote: > Hello, > > I have a new project writting a software with python a language. My > machine is running WinXP. As I have not much time to spend on it (It's > a project I'm writting at home) I'm looking for a simple and efficient > GUI. I have discovered PythonCard. It looks very interesting. I'm also > interrested in WAX. Does anybody know this package ? How do you > compare it with WAX ? I use PythonCard, I don't use (and never have used) Wax. That's both a warning about how biased my answer is likely to be, and a large part of my answer :-) I did look at them both, before choosing to investigate Pythoncard - and was sufficiently happy with what I found that I didn't need to go back to look in detail at Wax. Wax *feels* to me like wxPython, only easier and better. You do everything in the code; you create and lay out your components by writing lines in your source code. Wax makes it better - feels Pythonic instead of feeling like C++ - but it's still very "remote" from the GUI appearance. I prefer the feel of Pythoncard, where you can create and layout components in the resourceEditor (though if you need to, you can later move them, change them or create more of them in code). Pythoncard makes it easy to use wxPython directly, for any controls or events which are not yet included in Pythoncard; it's not clear whether Wax allows the same. Pythoncard is relatively active - not sure about Wax. I know Hans Nowak has said that he has little or no time to work on it, and is encouraging others to step forward if they wish to contribute; but as yet there are no additional developers listed on Sourceforge. -- 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.8 - Release Date: 11/06/2005 |
From: Phil E. <ph...@li...> - 2005-06-09 09:24:54
|
On Wed, 2005-06-08 at 19:32, kim...@ya... wrote: > I figured out why I have 0.81 and thinking that it's > the latest version. If you go to www.pythoncard.org > and click on getting latest version, you will end up > with 0.81. > > I was unable to figure out from a google search where > to download 0.82. > 0.8.2 hasn't been released yet. You can download the current CVS version, but this is not recommended for production use, and is really only of use to those who want to help with testing new features and/or bugfixes. The instructions for obtaining the current Pythoncard source tree by anonymous CVS can be found here: http://sourceforge.net/cvs/?group_id=19015 -- Regards Phil Edwards Brighton, UK |
From: Phil E. <ph...@li...> - 2005-06-09 08:34:13
|
On Thu, 2005-06-09 at 01:57, Bryan Murdock wrote: > Mandriva comes with python 2.4 and the rpm puts the PythonCard files > in /usr/lib/python2.3/site-packages. You can still use the rpm, just > type as root: > Thanks for the heads-up, Bryan. I'm maintainer of the Pythoncard RPMs for Mandrake/Mandriva, so I'll see if I can produce an updated version which correctly detects the version of Python being installed. Failing that, I'll put up an RPM specific to Python 2.4. > /usr/lib/python2.4/site-packages > ln -s /usr/lib/python2.3/site-packages/PythonCard . > > and then everything seems to work OK. > > Bryan > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users -- Regards Phil Edwards Brighton, UK |
From: Bryan M. <bmu...@gm...> - 2005-06-09 00:58:23
|
Hi, I've just installed PythonCard on my Mandriva Limited Edition 2005 box using the mdk rpms. There was a bit of a problem so I joined the mailing list, but then found the solution and figured I'd share it. Mandriva comes with python 2.4 and the rpm puts the PythonCard files in /usr/lib/python2.3/site-packages. You can still use the rpm, just type as root: /usr/lib/python2.4/site-packages ln -s /usr/lib/python2.3/site-packages/PythonCard . and then everything seems to work OK. Bryan |
From: <kim...@ya...> - 2005-06-08 18:32:09
|
I figured out why I have 0.81 and thinking that it's the latest version. If you go to www.pythoncard.org and click on getting latest version, you will end up with 0.81. I was unable to figure out from a google search where to download 0.82. Regards, -- John |
From: Alex T. <al...@tw...> - 2005-06-08 18:04:49
|
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 |
From: Alex T. <al...@tw...> - 2005-06-08 17:54:24
|
kim...@ya... wrote: >Okay, Alex, > >The simpleBrowser example works. May be it doesn't >use KeyEvent? > > > It does (at least, the version I have does). It has def on_fldURL_keyPress(self, event): keyCode = event.keyCode target = event.target if keyCode == 13: self.on_goURL_command(None) else: event.skip() which is why I mentioned typing a URL to it. Check if your sample/simpleBroswer has that too .... >I replaced the KeyEvent code in pythoncard\event.py to >the code you listed and the program doesn't crash. >It's not working like one would expect, however (may >be that's your purpose?) When I hit a key, say >BACKSPACE, the lower text field becomes >"TextArea18"... > > Sounds right - it previously had "TextArea1" in it (from the resource definition), so when you hit BACKSPACE it should: print the "point" to the console window and then execute the keyPress handler, which says def on_TextField1_keyPress(self, event): print event.keyCode self.components.TextArea1.text = self.components.TextArea1.text + "%d\n" % (event.keyCode) i.e. add the decimal value of the keyCode to the end of the text of TextArea1; BACKSPACE is ctrl-H == 8, so this is what I'd expect. Note I didn't do an event.Skip() in on_TextField1_keyPress, so the key would not be passed through the usual processing..... so (tentatively) I think the modified code is giving the right result. >Incidentally, my KeyEvent doesn't look like the one >you listed. It's doing: > >## > 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()) > aWxEvent.x = aWxEvent.GetX() > aWxEvent.y = aWxEvent.GetY() > aWxEvent.altDown = aWxEvent.AltDown() > aWxEvent.controlDown = aWxEvent.ControlDown() > aWxEvent.shiftDown = aWxEvent.ShiftDown() > > aWxEvent.keyCode = aWxEvent.GetKeyCode() > return aWxEvent >## > > > > I can't see what's different between that and what I quoted in the original mail 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()) (I only listed lines 335 to 341 - so apart from funny indentation of the comment, it looks the same as what you have). Perhaps just the confusion of line-wrapping in email ? >>From the Help function of the resource editor, I get: > >PythonCard > >PythonCard is a GUI construction kit for building >cross-platform desktop applications on Windows, Mac OS >X, and Linux, using the Python language. > >PythonCard version: 0.8.1 >wxPython version: 2.5.4.1 >Python version: 2.3.5 (#62, Feb 8 2005, 16:23:02) >[MSC v.1200 32 bit (Intel)] >Platform: win32 > >I will look around and see if I can find 0.8.2. > > As I said above - it looks as though it's working for you 0.8.1, so unless you run into a problem, you may be able to stick with 0.8.1 (0.8.2 may be only in CVS) >Regarding the unicode version, so far the only problem >I found is in the multi-column control. It was using >"String" as a class type check. The proper check >should have been "Strings". > > We should make sure we get that fix incorporated - but maybe we'll let it sit until you have another week or two's experience, in case you run into anything else .... -- 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 |
From: <kim...@ya...> - 2005-06-08 17:49:32
|
Puzzle partially solved. The issue is that there is an genuine problem of: IndexError: tuple index out of range as documented before. However, python.exe doesn't appear to be bothered by it. Since I am doing my development under WingIDE, I am seeing the error. The next question is to what to do about the error. I will hunt down 0.82 and see if it does better. As indicated, my event.py looks different from yours. Regards, -- John |
From: <kim...@ya...> - 2005-06-08 17:36:47
|
Sorry, Alex. I changed the wrong file. Let me try the KeyEvent change again....standby -- John |
From: <kim...@ya...> - 2005-06-08 17:32:17
|
Okay, Alex, The simpleBrowser example works. May be it doesn't use KeyEvent? I replaced the KeyEvent code in pythoncard\event.py to the code you listed and the program doesn't crash. It's not working like one would expect, however (may be that's your purpose?) When I hit a key, say BACKSPACE, the lower text field becomes "TextArea18"... Incidentally, my KeyEvent doesn't look like the one you listed. It's doing: ## 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()) aWxEvent.x = aWxEvent.GetX() aWxEvent.y = aWxEvent.GetY() aWxEvent.altDown = aWxEvent.AltDown() aWxEvent.controlDown = aWxEvent.ControlDown() aWxEvent.shiftDown = aWxEvent.ShiftDown() aWxEvent.keyCode = aWxEvent.GetKeyCode() return aWxEvent ## From the Help function of the resource editor, I get: PythonCard PythonCard is a GUI construction kit for building cross-platform desktop applications on Windows, Mac OS X, and Linux, using the Python language. PythonCard version: 0.8.1 wxPython version: 2.5.4.1 Python version: 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] Platform: win32 I will look around and see if I can find 0.8.2. Regarding the unicode version, so far the only problem I found is in the multi-column control. It was using "String" as a class type check. The proper check should have been "Strings". Thanks, -----Original Message----- Alex Tweedly wrote: > 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, > |
From: Bo G. <bo...@sy...> - 2005-06-08 14:47:07
|
Alex Tweedly wrote: > 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. > > I'm running Python 2.4, wxPython 2.5.3, PCard 0.81 and despite best efforts I can't get either keyPress handler to crash. My suggestion, since it requires the least amount of work, would be to try downgrading to wx-2.5.3.x and see what happens. At least rule it out. Bo |
From: Alex T. <al...@tw...> - 2005-06-08 12:31:47
|
kim...@ya... wrote: >Hello list, > >I am writing an app involving child-window. When the >child window invokes a dialogbox, it switches focus to >the main windows first, before poping up. Of course, >when it closes, the child-window becomes underneath >the main window. > > > That doesn't happen for me; this little sample below opens its main window, then a child window overlapping it; when you click on the button within the child, the child window stays above the main window with the dialog above the child. After the dialog is closed, the child remains on top and has focus. This might give you somewhere to start comparisons - or if you like, send the code that is misbehaving to me and I'll try to determine where the difference is. >Is there a parameter I am suppose to set or something >in order to maintain the proper z-order? > > > #!/usr/bin/python """ __version__ = "$Revision: 1.5 $" __date__ = "$Date: 2004/04/30 16:26:12 $" """ from PythonCard import model, dialog rsrc = {'application':{'type':'Application', 'name':'Template', 'backgrounds': [ {'type':'Background', 'name':'bgTemplate', 'title':'Standard Template with File->Exit menu', 'size':(400, 300), 'style':['resizeable'], 'menubar': {'type':'MenuBar', 'menus': [ {'type':'Menu', 'name':'menuFile', 'label':'&File', 'items': [ {'type':'MenuItem', 'name':'menuFileExit', 'label':'E&xit', 'command':'exit', }, ] }, ] }, 'components': [ {'type':'TextArea', 'name':'TextArea1', 'position':(52, 82), 'size':(205, 138), 'actionBindings':{}, 'text':'TextArea1', }, {'type':'TextField', 'name':'TextField1', 'position':(10, 10), 'size':(179, -1), 'actionBindings':{}, 'text':'TextField1', }, ] # end components } # end background ] # end backgrounds } } chldrsrc = {'application':{'type':'Application', 'name':'Template', 'backgrounds': [ {'type':'Background', 'name':'bgTemplate', 'title':'Standard Template with no menus', 'size':(400, 300), 'components': [ {'type':'Button', 'name':'btnDialog', 'position':(39, 25), 'actionBindings':{}, 'label':'testDialog', }, ] # end components } # end background ] # end backgrounds } } class myChild(model.Background): def on_initialize(self, event): # if you have any initialization # including sizer setup, do it here pass def on_btnDialog_mouseClick(self, event): result = dialog.singleChoiceDialog(self, "message", "title", ['one', 'two', 'three']) class MyBackground(model.Background): def on_initialize(self, event): # if you have any initialization # including sizer setup, do it here self.childWindow = model.childWindow(self, myChild, None, chldrsrc) self.childWindow.position = (250, 25) pass def on_TextField1_keyPress(self, event): print event.keyCode self.components.TextArea1.text = self.components.TextArea1.text + "%d\n" % (event.keyCode) pass if __name__ == '__main__': app = model.Application(MyBackground, None, rsrc) app.MainLoop() -- 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 |
From: Liam C. <cy...@gm...> - 2005-06-08 06:20:10
|
Hey man, At the end of your method which calls the dialog box i.e.=20 def foo(self, event): <some stuff> <dialog is called> <Dialog has finished, now call...> self.Raise() Try it, it may flicker, however. On 6/8/05, kim...@ya... <kim...@ya...= >=20 wrote: >=20 > Hello list, >=20 > I am writing an app involving child-window. When the > child window invokes a dialogbox, it switches focus to > the main windows first, before poping up. Of course, > when it closes, the child-window becomes underneath > the main window. >=20 > Is there a parameter I am suppose to set or something > in order to maintain the proper z-order? >=20 > Thanks, >=20 > -- > John >=20 >=20 > ------------------------------------------------------- > This SF.Net <http://SF.Net> email is sponsored by: NEC IT Guy Games. How= =20 > far can you shotput > a projector? How fast can you ride your desk chair down the office luge= =20 > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users >=20 --=20 'There is only one basic human right, and that is to do as you damn well=20 please. And with it comes the only basic human duty, to take the consequences.' |
From: Arthur E. <ar...@ia...> - 2005-06-07 23:23:24
|
Hi, trying to install PythonCard on OS X 10.4, but running into an import problem. I installed python2.4.1, wxPython2.6, TigerPython24Fix and TigerPython23Compat from Bob's packages page and added /usr/local/bin to my path. Python2.4 runs fine and I can import wx fine, but not pythoncard.. anyone know what can be wrong? Thanks, Arthur. |
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 |
From: <kim...@ya...> - 2005-06-07 22:07:23
|
Hello list, I am writing an app involving child-window. When the child window invokes a dialogbox, it switches focus to the main windows first, before poping up. Of course, when it closes, the child-window becomes underneath the main window. Is there a parameter I am suppose to set or something in order to maintain the proper z-order? Thanks, -- John |
From: <kim...@ya...> - 2005-06-07 22:03:52
|
Alex, Your code crashed the same way on my system. As soon as I hit a key at the entry field, the program crashed. Here's the trace back from WingIDE: IndexError: tuple index out of range Traceback (innermost last): File "C:\KeyEvent\KeyEvent.py", line 1, in ? #!/usr/bin/python File "C:\KeyEvent\KeyEvent.py", line 72, in ? app.MainLoop() File "D:\Python23\Lib\site-packages\wx-2.5.4-msw-unicode\wx\_core.py", line 5597, in MainLoop wx.PyApp.MainLoop(self) File "D:\Python23\Lib\site-packages\wx-2.5.4-msw-unicode\wx\_core.py", line 5031, in MainLoop return _core_.PyApp_MainLoop(*args, **kwargs) File "D:\Python23\Lib\site-packages\PythonCard\components\textfield.py", line 342, in _dispatch widget.Widget._dispatch(self, aWxEvent) File "D:\Python23\Lib\site-packages\PythonCard\widget.py", line 365, in _dispatch aWxEvent = eventClassInstance.decorate(aWxEvent, self) File "D:\Python23\Lib\site-packages\PythonCard\event.py", line 341, in decorate aWxEvent.position = tuple(aWxEvent.GetPosition()) File "D:\Python23\Lib\site-packages\wx-2.5.4-msw-unicode\wx\_core.py", line 1043, in __getitem__ Regards, -- John |
From: Alex T. <al...@tw...> - 2005-06-07 18:19:33
|
John Henry wrote: >No, the processing code has nothing with the problem. >The point is that the mere existence of the keyPress >handling is causing the crash. May be my handler is >not correct. I looked at the sample Pythoncard sample >programs and didn't find any sample code on how to add >the keyPress event. > > Can you please send the complete traceback report. Alternatively, here's a simple example that works OK for me ... #!/usr/bin/python """ __version__ = "$Revision: 1.5 $" __date__ = "$Date: 2004/04/30 16:26:12 $" """ rsrc = {'application':{'type':'Application', 'name':'Template', 'backgrounds': [ {'type':'Background', 'name':'bgTemplate', 'title':'Standard Template with File->Exit menu', 'size':(400, 300), 'style':['resizeable'], 'menubar': {'type':'MenuBar', 'menus': [ {'type':'Menu', 'name':'menuFile', 'label':'&File', 'items': [ {'type':'MenuItem', 'name':'menuFileExit', 'label':'E&xit', 'command':'exit', }, ] }, ] }, 'components': [ {'type':'TextArea', 'name':'TextArea1', 'position':(52, 82), 'size':(205, 138), 'actionBindings':{}, 'text':'TextArea1', }, {'type':'TextField', 'name':'TextField1', 'position':(10, 10), 'size':(179, -1), 'actionBindings':{}, 'text':'TextField1', }, ] # end components } # end background ] # end backgrounds } } from PythonCard import model class MyBackground(model.Background): def on_initialize(self, event): # if you have any initialization # including sizer setup, do it here pass def on_TextField1_keyPress(self, event): print event.keyCode self.components.TextArea1.text = self.components.TextArea1.text + "%d\n" % (event.keyCode) pass if __name__ == '__main__': app = model.Application(MyBackground, None, rsrc) app.MainLoop() -- 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 |
From: John H. <kim...@ya...> - 2005-06-07 15:25:12
|
No, the processing code has nothing with the problem. The point is that the mere existence of the keyPress handling is causing the crash. May be my handler is not correct. I looked at the sample Pythoncard sample programs and didn't find any sample code on how to add the keyPress event. Thanks again. > I am beginning to wonder if it has to do with the > keyPress event I am trying. This is what I am doing: > > #********* > def on_tfStudy_keyPress(self, event): > keyCode = event.keyCode > if keyCode==13 : > ...some processing code... > else: > event.skip() > #********* > > Without this event, the program doesn't crash. > > Sounds like that's the culprit; dig in with your usual debugging techniques to see where it is. If you want more help - just holler. Liam's request for the whole traceback is also a good idea if you want to send that - but I think you now have it narrowed down to something in the "...some processing code ..." -- |
From: Nicolas P. <nic...@la...> - 2005-06-06 19:24:26
|
Hello, I have a new project writting a software with python a language. My machine is running WinXP. As I have not much time to spend on it (It's a project I'm writting at home) I'm looking for a simple and efficient GUI. I have discovered PythonCard. It looks very interesting. I'm also interrested in WAX. Does anybody know this package ? How do you compare it with WAX ? Regards, Nicolas |
From: Schollnick, B. <Ben...@xe...> - 2005-06-06 16:02:05
|
> I doubt there is an easy way, not in wxPython. Which brings=20 > up an interesting question. I have been wondering whether=20 > sufficient conditions could exist to migrate 'value-added'=20 > widgets like this from sample code to core Pythoncard. This=20 > multi-button dialog is a good example. I expect code like=20 > this would normally be distro-ed as sample code, but why not=20 > make it a core component (or, I suppose more precisely, a=20 > core dialog wrapper)? Is there a policy against incorporating=20 > freestyle components and dialogs into core PCard? Just curious. Bo There's a few ways that it could be handled.... One method that I have started to use with a Text Parsing engine is a registry system.... The registry format that I use is along these lines.... Take a dictionary.... 1) The functions that are called are the keywords... 2) The data portion of the dictionary is the function "pointer" simple demo... def test (): print test return "registry demo..." registry_data =3D {} registry_data [ "test".upper().strip() ] =3D test data_returned =3D registry_data ["TEST"]() The drawback of this simplistic model, is that you can't easily exchange data unless the registry is part of a larger class... (Which my model is...) I have thought about extending it to support overloaded variables, etc... But something like this could be used to support "plugins" to Pythoncard.... Add.... def register_plugin ( plugin_name, function_pointer): plugin_name =3D plugin_name.upper().strip() if register_data.has_key ( plugin_name ): if function_pointer =3D=3D None: del register_data[ plugin_name ] return register_data[ plugin_name ] =3D function_pointer else: register_data[ plugin_name ] =3D function_pointer I'm typing this from memory, so it looks correct.... The main aspect of the plugin idea is how is the data returned? With my parser, each plugin returns their own piece of the parsed text.... So in pythoncard, maybe ....... plugin =3D a graphical widget? plugin =3D complete window? Just a idea.... - Benjamin =09 >=20 >=20 > Alex Tweedly wrote: >=20 > > Thanks Benjamin - but I'm looking for a way that allows me an > > arbitrary number of buttons, with labels I choose. > > I want to be able to write in code something like: > > > > result =3D multiButtonDialog.multiButtonDialog(self, \ > > 'Dad, can I go to the movies tonight', \ > > ['Yes', 'No', 'Maybe', 'Ask me later', 'Ask your mum'], \ > > "Movies Dialog Title") > > > > I think it does; but I want any number of buttons - not just 3 :-) > > > > It's starting to sound like there is no existing easy way, so I'll > > clean up my code and post it somewhere useful. > > And maybe start canvassing Kevin to allow such "utility"=20 > functions to=20 > > be included in PythonCard ... > > >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far=20 > can you shotput > a projector? How fast can you ride your desk chair down the=20 > office luge track? > If you want to score the big prize, get to know the little guy. =20 > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users >=20 |
From: Bo G. <bo...@sy...> - 2005-06-06 15:18:24
|
I doubt there is an easy way, not in wxPython. Which brings up an interesting question. I have been wondering whether sufficient conditions could exist to migrate 'value-added' widgets like this from sample code to core Pythoncard. This multi-button dialog is a good example. I expect code like this would normally be distro-ed as sample code, but why not make it a core component (or, I suppose more precisely, a core dialog wrapper)? Is there a policy against incorporating freestyle components and dialogs into core PCard? Just curious. Bo Alex Tweedly wrote: > Thanks Benjamin - but I'm looking for a way that allows me an > arbitrary number of buttons, with labels I choose. > I want to be able to write in code something like: > > result = multiButtonDialog.multiButtonDialog(self, \ > 'Dad, can I go to the movies tonight', \ > ['Yes', 'No', 'Maybe', 'Ask me later', 'Ask your mum'], \ > "Movies Dialog Title") > > I think it does; but I want any number of buttons - not just 3 :-) > > It's starting to sound like there is no existing easy way, so I'll > clean up my code and post it somewhere useful. > And maybe start canvassing Kevin to allow such "utility" functions to > be included in PythonCard ... > |
From: Alex T. <al...@tw...> - 2005-06-06 13:14:36
|
Schollnick, Benjamin wrote: >Alex, > >Not exactly what you are asking for....but it might be a feeble >starting point.... > > > Thanks Benjamin - but I'm looking for a way that allows me an arbitrary number of buttons, with labels I choose. I want to be able to write in code something like: result = multiButtonDialog.multiButtonDialog(self, \ 'Dad, can I go to the movies tonight', \ ['Yes', 'No', 'Maybe', 'Ask me later', 'Ask your mum'], \ "Movies Dialog Title") >I have not had a need since using Pythoncard to create the exact wrapper >you >are discussing... I think that WXPython has a MessageDialog that allows >you to >configure the 3 buttons, but I have not looked that up yet... > > > I think it does; but I want any number of buttons - not just 3 :-) It's starting to sound like there is no existing easy way, so I'll clean up my code and post it somewhere useful. And maybe start canvassing Kevin to allow such "utility" functions to be included in PythonCard ... -- 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 |
From: Schollnick, B. <Ben...@xe...> - 2005-06-06 12:06:11
|
Alex, Not exactly what you are asking for....but it might be a feeble starting point.... def wxPython_YesNo_Cancel_Dialog ( wxapp =3D None, title=3D"Alert!", msg_text=3D"Nothing to say" ): """Display a QUESTION string which can be answered with Yes or No. =09 Return 1 when the user clicks the Yes button. Return 0 when the user clicks the No button. Return -1 when the user clicks the Cancel button. =09 When the user presses Return, the DEFAULT value is returned. If omitted, this is 0 (No). =09 The QUESTION string can be at most 255 characters. """ =09 dlg =3D wxPython.wx.wxMessageDialog(wxapp, msg_text, title,=20 wxPython.wx.wxYES_NO | wxPython.wx.wxCANCEL | wxPython.wx.wxICON_INFORMATION) results =3D dlg.ShowModal() if results =3D=3D wxPython.wx.wxID_YES: results =3D True elif results =3D=3D wxPython.wx.wxID_NO: results =3D False elif results =3D=3D wxPython.wx.wxID_CANCEL: results =3D -1 dlg.Destroy() return results I have not had a need since using Pythoncard to create the exact wrapper you are discussing... I think that WXPython has a MessageDialog that allows you to configure the 3 buttons, but I have not looked that up yet... I just glanced, but did not see any obvious way to modify the messagedialog in wxpython... Without possibly customizing a subclass or creating a dialog from scratch in wxpython.... But I am *NOT* a wxpython guru.... I was good at Tkinter, but got tired of using Tkinter, started to use wxPython, and held a "pity" party of myself regarding wxPython documentation, and migrated to PythonCard... So I classify myself as "good enough to be dangerous" in regards to straight wxPython... - Benjamin=20 - Benjamin > -----Original Message----- > From: pyt...@li...=20 > [mailto:pyt...@li...] On=20 > Behalf Of Alex Tweedly > Sent: Saturday, June 04, 2005 4:38 PM > To: PythonCard > Subject: [Pythoncard-users] Easy way to get a multi-button dialg box >=20 >=20 >=20 > I was looking for an easy way to get a dialog box which=20 > presented some=20 > info, and then let the user choose one from a set of options, by=20 > clicking on one of a set of buttons. I was sure there was a=20 > way provided=20 > in Pythoncard (or at least in wxPython) to do this - but=20 > can't find it. >=20 > All I want is to get a dialog like >=20 > Can I go to the movies tonight ? >=20 > +-------+ +-------+ +-------+ > | Yes | | No | | Maybe | > +-------+ +-------+ +-------+ >=20 > without needing to build a new custom dialog each time. >=20 > So, I've built a couple of functions to do that for me - see=20 > code below=20 > to see the kind of thing I want. They could be improved and=20 > generalized=20 > a bit - but there's still this nagging feeling I'm missing=20 > some easy way=20 > .... anyone ? If no one tells me about an easy way that=20 > already exists,=20 > I'll improve these a bit and post them somewhere ... >=20 > testdialogs.py (needs a resource file, which only needs=20 > one button,=20 > so I didn't include it !!) > =3D=3D=3D=3D=3D=3D=3D=3D=3D > #!/usr/bin/python >=20 > """ > __version__ =3D "$Revision: 1.5 $" > __date__ =3D "$Date: 2004/04/30 16:26:12 $" > """ >=20 > from PythonCard import model > import multiButtonDialog >=20 > class MyBackground(model.Background): >=20 > def on_initialize(self, event): > # if you have any initialization > # including sizer setup, do it here > pass >=20 > def on_Button1_mouseClick(self, event): > result =3D multiButtonDialog.multiButtonDialog(self, 'some=20 > question', ['OK', 'Not OK', "Cancel"], "Test Dialog Title") > print "Dialog result:\naccepted: %s\ntext: %s" %=20 > (result.accepted, result.text) >=20 > result =3D multiButtonDialog.multiButtonDialog(self,=20 > 'Dad, can I=20 > go to the movies tonight', \ > ['Yes', 'No', 'Maybe', 'Ask me later', 'Ask=20 > your mum'],=20 > "Movies Dialog Title") > print "Dialog result:\naccepted: %s\ntext: %s" %=20 > (result.accepted, result.text) >=20 >=20 > if __name__ =3D=3D '__main__': > app =3D model.Application(MyBackground) > app.MainLoop() >=20 > multiButtonDialog.py > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > """ > __version__ =3D "$Revision: 1.3 $" > __date__ =3D "$Date: 2004/08/12 19:14:23 $" > """ >=20 > # dialog to present a block of text and a number of=20 > alternative buttons >=20 >=20 > from PythonCard import model > import controls >=20 > rsrc =3D {'type':'CustomDialog', > 'name':'Template', > 'title':'Template', > 'position':(176, 176), > 'size':(367, 230), > 'components': [ >=20 > ## {'type':'TextArea', > {'type':'StaticText', > 'name':'Text', > 'position':(10, 10), > 'size':(341, 123), > 'actionBindings':{}, > }, >=20 > {'type':'Button', > 'id':5101, > 'name':'Button', > 'position':(269, 145), > 'actionBindings':{}, > 'label':'template', > }, >=20 > ] # end components > } # end CustomDialog >=20 >=20 > class MyDialog(model.CustomDialog): > def __init__(self, parent, txt, buttons): > model.CustomDialog.__init__(self, parent, rsrc) > self.components.Text.text =3D txt > self.components.Button.visible =3D False > self.components.Button.enabled =3D False > if len(buttons) =3D=3D 0: buttons =3D ["OK"] > bx, by =3D self.components.Button.size > dx =3D bx + 20 > # check if all buttons will fit in window > owx, owy =3D self.size > startx, starty =3D self.components.Button.position > if len(buttons)*dx + bx + 40 > owx: > wx =3D len(buttons)*dx + bx + 40 > self.size =3D (wx, owy) > startx, starty =3D (wx-bx-20, owy-by-30) # AGT - why 30 = ?? > tsx, tsy =3D self.components.Text.size > self.components.Text.size =3D (wx-20, tsy) > =20 > localbuttons =3D buttons > localbuttons.reverse() > count =3D 0 > for b in localbuttons: > n =3D controls.copyButton(self, "Button",=20 > "Button"+str(count), b) > self.components[n.name].position =3D startx-count*dx, = starty > self.components[n.name].visible =3D True > self.components[n.name].enabled =3D True > count +=3D 1 > self.accepted =3D False > self.text =3D "" > =20 > def on_mouseClick(self, event): > self.text =3D event.target.userdata > if self.text =3D=3D "Cancel": > self.accepted =3D False > else: > self.accepted =3D True > self.Close() >=20 > def multiButtonDialog(parent, txt, buttons, title=3D""): > rsrc["title"] =3D title > dlg =3D MyDialog(parent, txt, buttons) > result =3D dlg.showModal() > result.accepted =3D dlg.accepted > result.text =3D dlg.text > dlg.destroy() > return result >=20 > controls.py > =3D=3D=3D=3D=3D=3D=3D >=20 > #!/usr/bin/python >=20 > # controls.py - a set of funcitonsd to manipulate contorls at run time >=20 > from PythonCard import model > from wxPython import wx > import string, copy > from types import * >=20 >=20 > class copyButton: > def __init__(self, Background, ButtonName, newname,=20 > Text=3D"new button"): > Flds =3D ['position', 'size', 'backgroundColor',=20 > 'foregroundColor', 'command', 'font'] > aWidget =3D Background.components[ButtonName] > d =3D {} > d['type'] =3D aWidget.__class__.__name__ > for key in Flds: # attributes > # I'm not exactly sure why I have to special-case=20 > these tuples > if key =3D=3D 'bitmap': > # this should get recreated from the file attribute > pass > elif key in ['position', 'size']: > d[key] =3D getattr(aWidget, key) > elif getattr(aWidget, key) is not None: > d[key] =3D getattr(aWidget, key) > d['userdata'] =3D Text > d['label'] =3D Text > d['name'] =3D newname > Background.components[newname] =3D d > self.name =3D newname >=20 > --=20 > Alex Tweedly http://www.tweedly.net >=20 >=20 >=20 > --=20 > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.322 / Virus Database: 267.5.2 - Release Date: 03/06/2005 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far=20 > can you shotput a projector? How fast can you ride your desk=20 > chair down the office luge track? If you want to score the=20 > big prize, get to know the little guy. =20 > Play to win an NEC 61" plasma display:=20 > http://www.necitguy.com/?r=3D20=20 > _______________________________________________ > Pythoncard-users mailing list Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users >=20 |