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: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2004-08-06 22:50:08
|
Is it OK to overlap Image and TextField components? As mentioned in another thread, I've used a large bitmap as an Image and place TextField components on top. I've noticed a couple of things: 1) Every time I change a property in one of the TextFields, all of the TextFields redraw and the current one disappears behind the Image. I can use the "move to front" to get it back, or if I save the resource project then upon reloading the TextFields are still all on top. This is 0.7.3.1 on Windows NT SP6a 2) When I move the project to Mac OSX 10.3.3/Pythoncard 0.7.3.1 the TextFields are not visible - if you click in the right place in the resource editor then you can see the cursor and type into them, but once you click elsewhere the contents disappear. If you run the project then again the TextFields appear but once you select them they stay on top. Using the resource editor's "move to front", etc. doesn't make any difference, but I think it's a drawing problem rather than a depth one (if that makes sense). Like I said, maybe I'm not using the components in the fashion they were intended? Neil |
From: Phil E. <ph...@li...> - 2004-07-30 22:23:23
|
On Friday 30 Jul 2004 14:21, Brian Debuire wrote: > <html><div style='background-color:'><DIV class=RTE>Hi everyone,</DIV> > <DIV class=RTE> </DIV> > <DIV class=RTE>I wonder if there is an spanish version of the python card > walkthroughs????</DIV> <DIV class=RTE> </DIV> > <DIV class=RTE>If not i'd like to translate them, to help latin people > to enjoy python card, also i would like to know where can i find the latest > version of the walkthroughs.</DIV> <DIV class=RTE> </DIV> > <DIV class=RTE>Write soon,</DIV> > <DIV class=RTE> </DIV> > <DIV class=RTE>Brian</DIV> > <DIV class=RTE> </DIV> > <DIV class=RTE> </DIV></div><br clear=all><hr>MSN 8 with <a > href="http://g.msn.com/8HMBEN/2740??PS=47575">e-mail virus protection > service: </a> 2 months FREE*</html> The walkthroughs and other documentation are currently in English only, so I'm sure a translation into another language would help a lot of people. The latest versions of everything are those shown on the Pythoncard web site. -- Regards Phil Edwards Brighton, UK |
From: Brian D. <deb...@ho...> - 2004-07-30 13:21:37
|
<html><div style='background-color:'><DIV class=RTE>Hi everyone,</DIV> <DIV class=RTE> </DIV> <DIV class=RTE>I wonder if there is an spanish version of the python card walkthroughs????</DIV> <DIV class=RTE> </DIV> <DIV class=RTE>If not i'd like to translate them, to help latin people to enjoy python card, also i would like to know where can i find the latest version of the walkthroughs.</DIV> <DIV class=RTE> </DIV> <DIV class=RTE>Write soon,</DIV> <DIV class=RTE> </DIV> <DIV class=RTE>Brian</DIV> <DIV class=RTE> </DIV> <DIV class=RTE> </DIV></div><br clear=all><hr>MSN 8 with <a href="http://g.msn.com/8HMBEN/2740??PS=47575">e-mail virus protection service: </a> 2 months FREE*</html> |
From: Andy T. <an...@ha...> - 2004-07-23 20:51:42
|
Schollnick, Benjamin wrote: >>> It appears that on Lists that you can't multiple select items? >>> >>> Is there anyway to allow multiple selects? > > >>Use the MultiColumnList component. This does what you require. > > > I can't seem to find documentation on the MultiColumnList... > > I'm populating it fine, but getStringSelection & > GetSelectedItems > are dying with a AttributeError on _getSelected.... > > Any simple examples? > > I don't see it in the demo... > > - Benjamin > It works fine for me. Perhaps you should post a simple example (including resource and code files) so that we can identify any problems you are running into. As for the documentation, well we need some ;-) As you can see from the framework overview (http://pythoncard.sourceforge.net/framework/components.html) MultiColumnList is actually a wxListCtrl (you can find that class' documentation here : http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin_wxlistctrl.html#wxlistctrl ) Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |
From: Kevin A. <al...@se...> - 2004-07-23 18:56:56
|
On Jul 23, 2004, at 8:40 AM, Schollnick, Benjamin wrote: > Folks, > > It appears that on Lists that you can't multiple select items? > > Is there anyway to allow multiple selects? > > - Benjamin > The List component is initialized with the wx.LB_SINGLE style (wx.wxLB_SINGLE in release 0.7.3.1 which still uses the wxPython.wx package). Since there is no option to use a different style you have a few options. You can change the List component to use the multiple selection style instead and then change the selection methods to handle lists instead. You could also create an appcomponents dir in the directory you are using for your project, copy the __init__.py and list.py files to that directory and then modify the list.py file so the component will only be changed for your application. Lastly, you could duplicate the list.py component file and create a new component for multiple selections. The demand has been low for having a multi-selection List in the past, so I'm not very enthusiastic about adding a style option for multi-selection to List since that would probably mean changing the selection methods to always handle lists of items instead of dealing with a single string. OTOH, it isn't particularly difficult to make the component changes and if the change is going to happen it should be done soon, so I'm willing to listen to arguments for supporting multi-selection both contiguous or not either for List and/or making a new component that supports multi-selection. ka |
From: Schollnick, B. <Ben...@xe...> - 2004-07-23 18:22:15
|
> > It appears that on Lists that you can't multiple select items? > >=20 > > Is there anyway to allow multiple selects? > Use the MultiColumnList component. This does what you require. I can't seem to find documentation on the MultiColumnList... =09 I'm populating it fine, but getStringSelection & GetSelectedItems are dying with a AttributeError on _getSelected.... Any simple examples? I don't see it in the demo... - Benjamin |
From: Andy T. <an...@ha...> - 2004-07-23 17:30:14
|
Schollnick, Benjamin wrote: > Folks, > > It appears that on Lists that you can't multiple select items? > > Is there anyway to allow multiple selects? > > - Benjamin > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_idG21&alloc_id040&op=click Use the MultiColumnList component. This does what you require. Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |
From: Schollnick, B. <Ben...@xe...> - 2004-07-23 15:48:53
|
Folks, It appears that on Lists that you can't multiple select items? Is there anyway to allow multiple selects? - Benjamin |
From: Phil E. <ph...@li...> - 2004-07-16 13:30:52
|
On Friday 16 Jul 2004 13:31, Schollnick, Benjamin wrote: > > > > Tip : I got tied in knots trying to do this in the "best" > > order; I found > > it's easiest to just simply > > - take the one that should be first, Move it to Front > > - then select the next one, Move Forward until it's in > > the right place > > - repeat. even easier way: find the one that should be last move to front find the one that shoud be next to last move to front find the one that should be before the other 2 move to front rinse, repeat... :-) -- Regards Phil Edwards Brighton, UK |
From: Schollnick, B. <Ben...@us...> - 2004-07-16 12:31:19
|
> > I created a GUI "out of order"... And now the tab > order on the GUI > > is wacky.... > > > > It goes Field 1, Field 8, Field 7, etc... > > > > Where/how do I change that in Pythoncard? > > In the Resource Editor. Select a component, then us menu > Options / Send to Back > / Move Backward > etc. > > Tip : I got tied in knots trying to do this in the "best" > order; I found > it's easiest to just simply > - take the one that should be first, Move it to Front > - then select the next one, Move Forward until it's in > the right place > - repeat. That's what that does?!?!?!? I thought it was visual "front" and visual "back", ala Quark, pagemaker, etc... Where items can be ontop of other items.... I'll try it. - Benjamin |
From: Kevin A. <al...@se...> - 2004-07-15 21:52:46
|
On Jul 15, 2004, at 1:40 PM, Alex Tweedly wrote: > At 15:46 15/07/2004 -0400, Schollnick, Benjamin wrote: > >> Folks, >> >> I created a GUI "out of order"... And now the tab order on >> the GUI >> is wacky.... >> >> It goes Field 1, Field 8, Field 7, etc... >> >> Where/how do I change that in Pythoncard? > > In the Resource Editor. Select a component, then us menu > Options / Send to Back > / Move Backward > etc. > > Tip : I got tied in knots trying to do this in the "best" order; I > found it's easiest to just simply > - take the one that should be first, Move it to Front > - then select the next one, Move Forward until it's in the right > place > - repeat. > > May be more keystrokes - but less frustrating than trying to be fancy > and do an "elevator" sort on them and getting it wrong. > The tab order will mirror the widget order you see in the Property Editor too, so that gives you a clue when doing the adjusting. ka |
From: Alex T. <al...@tw...> - 2004-07-15 20:42:58
|
At 15:46 15/07/2004 -0400, Schollnick, Benjamin wrote: >Folks, > > I created a GUI "out of order"... And now the tab order on the GUI > is wacky.... > > It goes Field 1, Field 8, Field 7, etc... > > Where/how do I change that in Pythoncard? In the Resource Editor. Select a component, then us menu Options / Send to Back / Move Backward etc. Tip : I got tied in knots trying to do this in the "best" order; I found it's easiest to just simply - take the one that should be first, Move it to Front - then select the next one, Move Forward until it's in the right place - repeat. May be more keystrokes - but less frustrating than trying to be fancy and do an "elevator" sort on them and getting it wrong. -- Alex. |
From: Schollnick, B. <Ben...@us...> - 2004-07-15 19:46:40
|
Folks, I created a GUI "out of order"... And now the tab order on the GUI is wacky.... It goes Field 1, Field 8, Field 7, etc... Where/how do I change that in Pythoncard? - Benjamin |
From: Adam R. <Ada...@ch...> - 2004-07-15 14:19:19
|
basically you'll need the following code(put in on_openBackground): #make the TaskBar icon self.tbIcon = wxTaskBarIcon() icon = wxIcon(cwd+"/"+'favicon.ico', wxBITMAP_TYPE_ICO) self.tbIcon.SetIcon(icon, "My Application") wx.EVT_TASKBAR_LEFT_DCLICK(self.tbIcon,self.OnTaskBarActivate) wx.EVT_TASKBAR_RIGHT_UP(self.tbIcon, self.OnTaskBarMenu) wx.EVT_MENU(self.tbIcon, self.TBMENU_RESTORE,self.OnTaskBarActivate) wx.EVT_MENU(self.tbIcon, self.TBMENU_CLOSE, self.OnTaskBarClose) wx.EVT_IDLE(self,self.idleHandler) wx.EVT_CLOSE(self,self.doExit) Of course, you'll need to define teh functions self.OnTaskBarActivate,self.OnTaskBarMenu, etc Also note you'll need an icon. I happen to use the oh so ubiquitous favicon.ico that I used on an accompanying web page. Hope that helps. pie...@ba... wrote: >Hello, > >I would like to know how I can make a Pythoncard application that hides in >the (Windows) system tray when the window is minimized & that re-appears if >I doubleclick on the system-tray icon. It would also be nice if a menu >appears when the tray icon is right-clicked... > >Can anyone help me with this? > >Pieter Coppens > > >"The information contained in this e-mail and any attachment thereto is confidential and >may contain information which is protected by intellectual property rights. >This information is intended for the exclusive use of the recipient(s) named above. >This e-mail does not constitute any binding relationship or offer toward any of the addressees. >If you are not one of the addressees , one of their employees or a proxy holder entitled >to hand over this message to the addressee(s), any use of the information contained >herein (e.g. reproduction, divulgation, communication or distribution,...) is prohibited. >If you have received this message in error, please notify the sender and destroy it immediately after. >The integrity and security of this message cannot be guaranteed and it may be subject to >data corruption, interception and unauthorized amendment, for which we accept no liability." > > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click >_______________________________________________ >Pythoncard-users mailing list >Pyt...@li... >https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > |
From: Joona K. <jo...@fi...> - 2004-07-15 13:36:01
|
Hi > I would like to know how I can make a Pythoncard application that hides in > the (Windows) system tray when the window is minimized & that re-appears if > I doubleclick on the system-tray icon. It would also be nice if a menu > appears when the tray icon is right-clicked... I've done solution like this once, but unfortunately I lost the code on hard drive crash. The article at wxPython wiki named FlashingTaskbarIcon was really helpful for me. You have to use wxPython to do it, but it's very siple to implement to work with PythonCard application. I'd love to help you more, but I have to hurry right now, so I'll throw this link to you. I hope that helps. http://wiki.wxpython.org/index.cgi/FlashingTaskbarIcon Greetings, joona -- Joona Kulmala <jo...@fi...> |
From: <pie...@ba...> - 2004-07-15 12:57:37
|
Hello, I would like to know how I can make a Pythoncard application that hides in the (Windows) system tray when the window is minimized & that re-appears if I doubleclick on the system-tray icon. It would also be nice if a menu appears when the tray icon is right-clicked... Can anyone help me with this? Pieter Coppens "The information contained in this e-mail and any attachment thereto is confidential and may contain information which is protected by intellectual property rights. This information is intended for the exclusive use of the recipient(s) named above. This e-mail does not constitute any binding relationship or offer toward any of the addressees. If you are not one of the addressees , one of their employees or a proxy holder entitled to hand over this message to the addressee(s), any use of the information contained herein (e.g. reproduction, divulgation, communication or distribution,...) is prohibited. If you have received this message in error, please notify the sender and destroy it immediately after. The integrity and security of this message cannot be guaranteed and it may be subject to data corruption, interception and unauthorized amendment, for which we accept no liability." |
From: Phil E. <ph...@li...> - 2004-07-13 14:39:58
|
On Tuesday 13 Jul 2004 09:08, Phil Edwards wrote: > > Mandrake 10.0 ships with Python 2.3.3, and I've tried wxPython 2.4 but not > 2.5 as yet. Okay, wx2.5 now tested, and the same odd behaviour remains, so I'm forced to conclude that it's an issue with Mandrake rather than anything else... :-( -- Regards Phil Edwards Brighton, UK |
From: Phil E. <ph...@li...> - 2004-07-13 08:10:37
|
Has anybody tried PythonCard and/or wxPython on Mandrake Linux 10.0 yet? I'm having problems (more so with wxPython that PythonCard) since upgrading to 10.0, I was just wondering if anybody else had seen the same thing. Mandrake 10.0 ships with Python 2.3.3, and I've tried wxPython 2.4 but not 2.5 as yet. -- Yours curiously Phil Edwards Brighton, UK |
From: Kevin A. <al...@se...> - 2004-07-12 16:42:38
|
Alex has joined the list of PythonCard developers. He will be making the changes below for the resourceEditor in release 0.8. If you have any comments on the changes then you should let us know before they get checked in, thanks. OSCON is coming up and I'm still waiting on a general distribution release of wxPython 2.5.2.x, but once that is available I plan to get 0.8 out-the-door. Many of the incomplete items on the wiki to do list will probably get bumped to release 0.9. And a big thanks to Alex for answering so many questions on the mailing list lately! ka On Jul 8, 2004, at 4:24 PM, Alex Tweedly wrote: > > I felt that using the Resource Editor wasn't quite as easy as it > should be. No major problem, no big deal - but it just seemed like > there was too much mouse usage, too many things to select, too much > clicking, etc. (I use a laptop mostly, and so I'm perhaps more > sensitive than I would be if I used a desktop and an actual mouse). > > I decided I'd have a go at modifying the Resource Editor, figuring > that even if I didn't succeed, I'd at least learn some more about how > to it's put together, and some new tips and tricks. I think I did > that, but I chickened out of some of the more radical changes I > thought of, because I wasn't ready to learn that much at one time. > > I decided that the things that most bothered me were > - creating new menus; too much mouse clicking to position the new > entries, and too much repetitive typing > - adding new components you almost always change the name, then need > to go re-select it, then scroll to the "label" or "text" property, > then change it. > - duplicating components - the default of small offset (10,10) is > never what I want, and often confusing because it's right over the > original. > > A detailed description of the changes follows. The code can be > downloaded via www.tweedly.net/Python > > Changes made: > > 1. The menuEditor. > > 1.1 When you add a new Menu or new MenuItem, it is added immediately > after (below) the current selection, instead of at the end of the > list. So you don't need to repeatedly click "Up" to put each one > into the place you want it. > > 1.2 When adding a new Menu, if you modify the Label value but not the > Name value, the Menu is given a name derived from the Label's > value. The derivation is simple (remove all punctuation including > spaces). But since it is common practice to keep the Name and Label > matching, this will be correct 99% of the time. > > 1.3 When adding a new MenuItem, the default name is calculated from > the parent Menu (e.g. if the current selection is the File menu, or > any item within it, then the name given will be "newFileNewItem"; > the Label will be simply "New Item"). > > 1.4 If the Label value is edited, and the Name value is left > unchanged, then the Name value will be derived from the > Label. (e.g. if you change the Label from "New Item" to "&Close", > the name will automatically change from "newFileNewItem" to > "newFileClose". Remember - if you edit the Name field, it will no > longer be automatically updated. > > 2. Creating a new component. > > Similar rules apply whether the component is created as a result of > duplicating, or copy/pasting or directly adding a new > component. (i.e. any of Edit/Duplicate Component, or by Copy/Paste, or > by Component/<component>. > > A dialog is popped up, allowing the user to modify the Name and Label > (or, if the component has no label, the Text) fields. I found that 99% > of the time I change the Name, and maybe 80% of the time I change the > Label/Text. So it's easier and faster to just fill in the dialog than > it is to have the component be created with default values, then click > around in the properties window to change them. > > I also added "horizontal" and "vertical" checkboxes. If these are > checked, the new component will be offset in that dimension from the > original (for duplication or pasting). If they are checked, the offset > used is the size of the original component plus 30 pixels - so often > the new position will be usable without further positioning. If > neither is checked, then I default to the existing behaviour - > i.e. offset by (10,10). > > I did have in mind some rules for deriving the name from the Label / > Text, similar to what I did in the MenuEditor. But I couldn't decide > just which rules to use - so I decided to implement this "partial" > solution, and then get some experience with it before trying to decide > which derivation rules to use. > > > > > Installation instructions: > > 1. take a copy of the resourceEditor folder > - call it myresourceEditor or similar > 2. unzip the files > 3. replace tools/myresourceEditor/resourceEditor.py > 4. replace the menuDialog.py and menuDialog.rsrc.py in > tools/myresourceEditor/modules > 5. put the newcomponentDialog.py and newcomponentDialog.rsrc.py into > tools/myresourceEditor/modules > > > -- Alex. > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.714 / Virus Database: 470 - Release Date: 02/07/2004 |
From: Kevin A. <al...@se...> - 2004-07-10 02:48:51
|
Alex provided some good info. The findfiles tool, hopalong, life, and spirograph samples all make use of SafeYield so I suggest taking a look at those for various ways of starting a long running process that doesn't involve using threads. I particularly like the use of a generator in the hopalong sample and just like the other samples mentioned above it handles starting a routine and allowing the user to stop the execution in a clean way. Other samples such as webgrabber, chat, jabberChat, webserver show how to use threads, but using threads is more complicated and error-prone and you probably don't need them. ka On Jul 9, 2004, at 8:39 AM, Alex Tweedly wrote: > At 14:01 09/07/2004 +0200, pie...@ba... wrote: > >> Hello, >> >> I have the following problem: >> >> I'm writing a PythonCard application that has 2 buttons (a start >> button and >> a stop button). >> >> When I press the start button, the 'on_cmdStart_mouseClick(self, >> event):' >> function is executed. >> Now, I want to be able to stop that function at any time by pressing >> the >> STOP button. >> >> My problem is now that 'mouseClick'-events are not seen as long as >> I'm in >> the 'on_cmdStart_...' function. >> >> Can anyone help me? > > It's not just mouse-Click events that aren't seen - while your code is > running, no events will be processed. > > You should read (or re-read to remind yourself) about > http://pythoncard.sourceforge.net/timers-threads.html > > Note in particular the introductory paragraph that says: > >> Most of the top-level code you add to the front ends - your >> PythonCard user interfaces - is event handlers. As with programming >> with any GUI, event handlers should always complete their job fast, >> and return promptly, so they don't 'clog up the works'. PythonCard is >> no exception. > > While an event handler is running, no further events can happen. The > cleanest way to deal with processing that takes a long time is using > threads - and is well explained in that tutorial. > > If you have a really simple case, you can use the wxApp function Yield > - but read the cautions about its dangers - see the wx documentation > for wxApp::Yield > > Here's a simple bit of code that shows what this does > > Notes. > 1. the work this does to keep it busy is calculate factorials - hey, > I've always wanted a chance to write a recursive factorial function > for a good purpose :-) > 2. each time round the loop, it calls yield to allow other events to > be processed - without this the Stop button click wouldn't happen, and > in fact the writing and updating of the TextArea would happen. (try > commenting out the Yield line to see it fail ....) > 3. the "app" in "app.Yield()" is the global from the main program (not > included here, but the standard name used in the templates). > > > def on_openBackground(self, event): > self.results = [] > > def on_Start_mouseClick(self, event): > def fact(i): > if i<=1: return 1 > return i * fact(i-1) > > self.stopping = False > for i in range(1000): > j = fact(i) > s = "%d! is %d" % (i, j) > ## self.results.append(s) > ## self.components.TextArea1.text = "\n".join(self.results) > self.components.TextArea1.text = str(i) > app.Yield() > if self.stopping: break > > def on_Stop_mouseClick(self, event): > self.stopping = True > > > -- Alex. > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.714 / Virus Database: 470 - Release Date: 02/07/2004 |
From: Alex T. <al...@tw...> - 2004-07-09 16:19:47
|
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.714 / Virus Database: 470 - Release Date: 02/07/2004 |
From: Alex T. <al...@tw...> - 2004-07-09 15:34:23
|
At 14:01 09/07/2004 +0200, pie...@ba... wrote: >Hello, > >I have the following problem: > >I'm writing a PythonCard application that has 2 buttons (a start button and >a stop button). > >When I press the start button, the 'on_cmdStart_mouseClick(self, event):' >function is executed. >Now, I want to be able to stop that function at any time by pressing the >STOP button. > >My problem is now that 'mouseClick'-events are not seen as long as I'm in >the 'on_cmdStart_...' function. > >Can anyone help me? It's not just mouse-Click events that aren't seen - while your code is running, no events will be processed. You should read (or re-read to remind yourself) about http://pythoncard.sourceforge.net/timers-threads.html Note in particular the introductory paragraph that says: >Most of the top-level code you add to the front ends - your PythonCard >user interfaces - is event handlers. As with programming with any GUI, >event handlers should always complete their job fast, and return promptly, >so they don't 'clog up the works'. PythonCard is no exception. While an event handler is running, no further events can happen. The cleanest way to deal with processing that takes a long time is using threads - and is well explained in that tutorial. If you have a really simple case, you can use the wxApp function Yield - but read the cautions about its dangers - see the wx documentation for wxApp::Yield Here's a simple bit of code that shows what this does Notes. 1. the work this does to keep it busy is calculate factorials - hey, I've always wanted a chance to write a recursive factorial function for a good purpose :-) 2. each time round the loop, it calls yield to allow other events to be processed - without this the Stop button click wouldn't happen, and in fact the writing and updating of the TextArea would happen. (try commenting out the Yield line to see it fail ....) 3. the "app" in "app.Yield()" is the global from the main program (not included here, but the standard name used in the templates). def on_openBackground(self, event): self.results = [] def on_Start_mouseClick(self, event): def fact(i): if i<=1: return 1 return i * fact(i-1) self.stopping = False for i in range(1000): j = fact(i) s = "%d! is %d" % (i, j) ## self.results.append(s) ## self.components.TextArea1.text = "\n".join(self.results) self.components.TextArea1.text = str(i) app.Yield() if self.stopping: break def on_Stop_mouseClick(self, event): self.stopping = True -- Alex. |
From: <pie...@ba...> - 2004-07-09 12:03:33
|
Hello, I have the following problem: I'm writing a PythonCard application that has 2 buttons (a start button and a stop button). When I press the start button, the 'on_cmdStart_mouseClick(self, event):' function is executed. Now, I want to be able to stop that function at any time by pressing the STOP button. My problem is now that 'mouseClick'-events are not seen as long as I'm in the 'on_cmdStart_...' function. Can anyone help me? Pieter "The information contained in this e-mail and any attachment thereto is confidential and may contain information which is protected by intellectual property rights. This information is intended for the exclusive use of the recipient(s) named above. This e-mail does not constitute any binding relationship or offer toward any of the addressees. If you are not one of the addressees , one of their employees or a proxy holder entitled to hand over this message to the addressee(s), any use of the information contained herein (e.g. reproduction, divulgation, communication or distribution,...) is prohibited. If you have received this message in error, please notify the sender and destroy it immediately after. The integrity and security of this message cannot be guaranteed and it may be subject to data corruption, interception and unauthorized amendment, for which we accept no liability." |
From: Selwyn M. <sel...@pa...> - 2004-07-09 07:46:19
|
hi Alex, thanks for trying to help. however the popup calendar I was referring to works like a textfield that pops up as a calendar rather than as a separate dialog. For the version of wxpython I have (i.e. 2.5.1.5u) the example is listed in the WxPython Overview -> Customcontrols -> PopupControl directory in the wxPython demo (not the pythoncard samples directory). I am trying to help ensure that valid dates are entered into my text fields. At the moment I have a rather inelegant validation checker that pops a dialog when a incorrectly formatted date is entered into the text field. I want to prevent my intended users from entering an invalid date by either including a popup calendar (or a masked edit control, which is also presented in the wxpython demo). Although a handy widget, the basic calendar simply occupies too much space on my already crowded forms. I guess what I would like is some advice on the necessary steps needed to wrap raw wxpython widgets in pythoncard, using either the popup menu or the masked edit controls as examples. thanks again, Selwyn Alex Tweedly wrote: > At 20:04 06/07/2004 +1200, Selwyn McCracken wrote: > >> hi there, >> >> in the wxPython demo there is a nifty popup calendar (i.e. >> PopupControl.py). > > > There are so many things in the wxDemo I'm not sure which one you mean > (neither of the two calendar demos I saw seemed to use PopupControl.py) > >> Could someone please give me a few pointers on how I would go about >> wrapping this and making it available in my pythoncard app. > > > So I won't answer your question directly, but will answer another, > hopefully related, one instead ... > > The easiest way to get a pop-up calendar is to create a Custom Dialog, > and put a calendar control (along with the OK and Cancel) buttons in it. > I've build a sample version, including a test program that uses it, - > you can download it via http://www.tweedly.net/Python/index.html > > Note - I did one additional thing: the simple way to select a date is to > click on the date (so it is highlighted), and then click on the OK > button. I made it possible to also double-click on a date and that will > immediately select that date and close the dialog. > > Hope that helps - but if not, can you say specifically what example in > wxDemo you are looking at, and what you want from it that you don't get > this way. > > Thanks > -- Alex. > > > ------------------------------------------------------------------------ > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.714 / Virus Database: 470 - Release Date: 02/07/2004 |
From: Alex T. <al...@tw...> - 2004-07-08 23:17:46
|
I felt that using the Resource Editor wasn't quite as easy as it should be. No major problem, no big deal - but it just seemed like there was too much mouse usage, too many things to select, too much clicking, etc. (I use a laptop mostly, and so I'm perhaps more sensitive than I would be if I used a desktop and an actual mouse). I decided I'd have a go at modifying the Resource Editor, figuring that even if I didn't succeed, I'd at least learn some more about how to it's put together, and some new tips and tricks. I think I did that, but I chickened out of some of the more radical changes I thought of, because I wasn't ready to learn that much at one time. I decided that the things that most bothered me were - creating new menus; too much mouse clicking to position the new entries, and too much repetitive typing - adding new components you almost always change the name, then need to go re-select it, then scroll to the "label" or "text" property, then change it. - duplicating components - the default of small offset (10,10) is never what I want, and often confusing because it's right over the original. A detailed description of the changes follows. The code can be downloaded via www.tweedly.net/Python Changes made: 1. The menuEditor. 1.1 When you add a new Menu or new MenuItem, it is added immediately after (below) the current selection, instead of at the end of the list. So you don't need to repeatedly click "Up" to put each one into the place you want it. 1.2 When adding a new Menu, if you modify the Label value but not the Name value, the Menu is given a name derived from the Label's value. The derivation is simple (remove all punctuation including spaces). But since it is common practice to keep the Name and Label matching, this will be correct 99% of the time. 1.3 When adding a new MenuItem, the default name is calculated from the parent Menu (e.g. if the current selection is the File menu, or any item within it, then the name given will be "newFileNewItem"; the Label will be simply "New Item"). 1.4 If the Label value is edited, and the Name value is left unchanged, then the Name value will be derived from the Label. (e.g. if you change the Label from "New Item" to "&Close", the name will automatically change from "newFileNewItem" to "newFileClose". Remember - if you edit the Name field, it will no longer be automatically updated. 2. Creating a new component. Similar rules apply whether the component is created as a result of duplicating, or copy/pasting or directly adding a new component. (i.e. any of Edit/Duplicate Component, or by Copy/Paste, or by Component/<component>. A dialog is popped up, allowing the user to modify the Name and Label (or, if the component has no label, the Text) fields. I found that 99% of the time I change the Name, and maybe 80% of the time I change the Label/Text. So it's easier and faster to just fill in the dialog than it is to have the component be created with default values, then click around in the properties window to change them. I also added "horizontal" and "vertical" checkboxes. If these are checked, the new component will be offset in that dimension from the original (for duplication or pasting). If they are checked, the offset used is the size of the original component plus 30 pixels - so often the new position will be usable without further positioning. If neither is checked, then I default to the existing behaviour - i.e. offset by (10,10). I did have in mind some rules for deriving the name from the Label / Text, similar to what I did in the MenuEditor. But I couldn't decide just which rules to use - so I decided to implement this "partial" solution, and then get some experience with it before trying to decide which derivation rules to use. Installation instructions: 1. take a copy of the resourceEditor folder - call it myresourceEditor or similar 2. unzip the files 3. replace tools/myresourceEditor/resourceEditor.py 4. replace the menuDialog.py and menuDialog.rsrc.py in tools/myresourceEditor/modules 5. put the newcomponentDialog.py and newcomponentDialog.rsrc.py into tools/myresourceEditor/modules -- Alex. |