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-09-30 07:32:24
|
On Mon, 27 Sep 2004 08:39:18 -0700, Kevin Altis wrote: >There was already a PasswordField component that you could use in a >Background. You could also pass in a style flag to the textEntryDialog >to get the password and multi-line variations of the dialog, but I >figured we might as well just make them standalone functions for >simplicity. Hope it helps. Yikes! Talk about looking but not seeing - how many times have I opened the list of components in the resource editor and missed the password one. Thanks for the pointer and the new dialog anyway. > >> Kevin...what's the schedule for releasing 0.8.1, or whatever the next >> version is? I haven't got around to accessing via CVS yet because 0.8 >> has >> more than kept me occupied so far. Just curious. >> >Originally I planned on releasing 0.8.1 sometime in September, but my >guess is it will be sometime in October. Release 0.8 didn't turn out to >have as many bugs as I thought it might considering all the major >changes, so I don't think anyone is clamoring for a new release. As the >fall progresses, more and more of my time will be sucked away by the >deluge of videogames though, so I want to get a release out before the >coding sprint in Seattle (Oct. 23-24). That way if if I'm not doing >much coding in October and November people will at least have the >changes added in the last month. This is what the change log shows as >of this morning... Sounds good. Clearly I haven't come close to using all of the stuff in 0.8 yet and there haven't been any show-stoppers with what I've been building up to this point (simple utilities using ODBC so far). Neil |
From: Daryl F. <fly...@sb...> - 2004-09-30 07:32:10
|
Hello all, I just wanted to drop a quick (well, maybe not so quick) note of thanks to Kevin and friends for making such a great tool. Yesterday a package of two Memsic 2125 Accelerometers arrived in the mail and I needed to check them out. I had intended to write a quick program on my basic stamp just to verify that they work. However, due to an accident involving a high voltage generator, the basic stamp and my LCD it looked like I was out of luck. I had access to a number of other micro controllers, but no other LCD that wasn't hard wired into another project. And hey, I wanted it to look nice too. :) I decided to give pythoncard a go since all that I really needed was a front end to display some data. I hacked together a little program for the Athena uC (small stamp clone) that just measures the pulse width on one of the 2125's outputs (two axis may come later) and dumps it to the serial port connected to my computer. --- test2125 --- ' Memsic 2125 Test dim T1 ' 2125 pulse width const Ser 5 ' Serial pin const Xout 0 ' Input from 2125 PULSEINSCALE = 4 input Xout output Ser loop: pulsein Xout, 3, T1 serout Ser, T1 goto loop Then I tossed together a quick front end using pythoncard: --- read2125.rsrc.py --- {'application':{'type':'Application', 'name':'Template', 'backgrounds': [ {'type':'Background', 'name':'bgTemplate', 'title':'Memsic 2125 Tester', 'position':(37, 81), 'size':(400, 207), 'menubar': {'type':'MenuBar', 'menus': [ {'type':'Menu', 'name':'menuFile', 'label':'&File', 'items': [ {'type':'MenuItem', 'name':'menuFileExit', 'label':'E&xit\tAlt+X', 'command':'exit', }, ] }, ] }, 'components': [ {'type':'StaticText', 'name':'labelPos2', 'position':(370, 75), 'text':'2g', }, {'type':'StaticText', 'name':'labelPos1', 'position':(280, 75), 'text':'1g', }, {'type':'StaticText', 'name':'label0', 'position':(190, 75), 'text':'0g', }, {'type':'StaticText', 'name':'labelNeg1', 'position':(95, 75), 'text':'-1g', }, {'type':'StaticText', 'name':'labelNeg2', 'position':(5, 75), 'text':'-2g', }, {'type':'TextField', 'name':'Force', 'position':(145, 105), 'alignment':'center', 'editable':False, }, {'type':'StaticText', 'name':'TitleText', 'position':(140, 15), 'text':'Force (1g = 9.81m/s^2)', }, {'type':'Gauge', 'name':'Gauge', 'position':(10, 40), 'size':(370, 28), 'layout':'horizontal', 'max':4000, 'value':2000, }, ] # end components } # end background ] # end backgrounds } } --- read2125.py --- #!/usr/bin/python """ __version__ = "$Revision: 1.5 $" __date__ = "$Date: 2004/04/30 16:26:12 $" """ from PythonCard import model, dialog from wxPython import wx import accel class MyBackground(model.Background): def on_initialize(self, event): self.Device = accel.Memsic() if not self.Device.Alive: dialog.alertDialog(self, 'ERROR: Cannot connect to device', 'Serial Error') self.close() self.Timer = wx.wxTimer(self.components.Force, -1) self.Timer.Start(100) # 100 ms updates def on_Force_timer(self, event): F = self.Device.GetForce() if F != None: # Note: The gauge is scaled by 1000 because it needs # integers for value. self.components.Gauge.value = int((F + 2.0) * 1000) self.components.Force.text = '%0.3f' % F else: self.components.Force.text = 'N/A' def on_close(self, event): # Deamonize the thread to avoid this? self.Device.Stop() event.Skip() if __name__ == '__main__': app = model.Application(MyBackground) app.MainLoop() And an interface class: --- accel.py --- import serial import Queue import threading class Memsic: def __init__(self): # Brain dead serial setup self.Ser = serial.Serial(0) self.Ser.baudrate = 9600 self.Ser.timeout = 1 self.Alive = False try: self.Ser.open() # COM1, 9600,N,8,1 except serial.SerialException: # Exception catching has not been tested return # Probably don't need to do this. May be easier just # to read as needed. Don't worry about overflow. Oh # well, threads are fun. self.RxQueue = Queue.Queue() self.Alive = True Thread = threading.Thread(target=self.Reader) Thread.start() # Set this to the number of seconds per unit for the T1 # pulse width. For the BS2 it should be 2us (2e-6) but # may be different by default on other uC systems. self.Units = 32e-6 # 32us for Athena def Stop(self): self.Alive = False def Reader(self): while self.Alive: Data = self.Ser.read(1) # Abusing the empty() method if Data and self.RxQueue.empty(): Value = ord(Data) if Value < 0 or Value > 255: continue self.RxQueue.put(Value) def GetForce(self): try: Value = self.RxQueue.get(True, 0.250) except Queue.Empty: return None return self.F(Value) def F(self, Value): T1 = Value * self.Units # Assume that T2 = 10ms. For greater accuracy, we should # measure this every N cycles or so. This will only be # accurate at 25C (if properly calibrated). T2 = 10e-3 return ((T1/T2) - 0.5) * 8 The whole process took under an hour and looks (IMHO) great. Tip the board with the accelerometer and watch the pretty pictures. I'm sorry if this is too long a message or if I'm clogging up important developer talk, but I'm still stoked at how easy this was put together. Of course I still have a welt from the HV generator and I'm still out a microcontroller and LCD from the same, but this made my day. Kevin, I know you spend a lot of time answering simple (repetitive?) questions on this list ("How do I colour items in a list?") but thank you very much for all your hard work. -Daryl |
From: Smith, F. <F....@te...> - 2004-09-29 21:18:20
|
This is very timely Kevin since I'm working on an application that would be well suited to Splitter main frame/background with codeEditors in at least two of the panes - it's a translation utility from a source pane to converted frame. Anyway, (I've elected to put the 2nd codeEditor in a child window for the time being.) Anyway, my application would fit just fine with what you've described to date. The kind of functionality within the sash examples in the wxPython demo is pretty cool though, basically supporting unlimited pane distribution within the background layout. Does this make sense?=20 I think the mp3 player in the PythonCard distribution might be an example of an application that could benefit from a splitter paradigm. Right now it has two static text areas. Regardless .... Thanks for working on this Kevin. -----Original Message----- From: Kevin Altis [mailto:al...@se...]=20 Sent: Wednesday, September 29, 2004 3:43 PM To: pythoncard-Users Subject: [Pythoncard-users] SplitterBackground and testSplitter sample Yesterday I checked in a new model.py that contains a very experimental=20 SplitterBackground subclass of Background along with a testSplitter=20 sample as a proof-of-concept of a 3 pane IDE-like window that contains=20 three separate panes (left, right-top, right-bottom). All the work is=20 done in the on_initialize method and was more or less stolen from the=20 wxPython demo Main.py file but it does show that backgrounds of other=20 samples can be used as panes in splitters similar to how pages in a=20 Notebook currently work by changing the superclass from Background to=20 PageBackground. If you have been waiting for splitter support, I would appreciate some=20 feedback on the types of windows or apps you were looking forward to=20 creating to get a better idea of whether we should just support a=20 default set of the most common pane configurations or allow unlimited=20 nesting. If there are particular samples or tools that you think would=20 benefit from the use of splitters as opposed to a single pane static or=20 sizer layout, etc. please say so, as those might make good tests of=20 features and expose problems with my simple wrapper. There are other issues with regards to where event handlers should be=20 located for common functionality, how user code should go about=20 determining which pane has focus, etc. I need to get some input from=20 the list so that I know whether I should be spending much time on=20 splitters before doing release 0.8.1 later this month. ka ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Pythoncard-users mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/pythoncard-users |
From: Kevin A. <al...@se...> - 2004-09-29 19:43:04
|
Yesterday I checked in a new model.py that contains a very experimental SplitterBackground subclass of Background along with a testSplitter sample as a proof-of-concept of a 3 pane IDE-like window that contains three separate panes (left, right-top, right-bottom). All the work is done in the on_initialize method and was more or less stolen from the wxPython demo Main.py file but it does show that backgrounds of other samples can be used as panes in splitters similar to how pages in a Notebook currently work by changing the superclass from Background to PageBackground. If you have been waiting for splitter support, I would appreciate some feedback on the types of windows or apps you were looking forward to creating to get a better idea of whether we should just support a default set of the most common pane configurations or allow unlimited nesting. If there are particular samples or tools that you think would benefit from the use of splitters as opposed to a single pane static or sizer layout, etc. please say so, as those might make good tests of features and expose problems with my simple wrapper. There are other issues with regards to where event handlers should be located for common functionality, how user code should go about determining which pane has focus, etc. I need to get some input from the list so that I know whether I should be spending much time on splitters before doing release 0.8.1 later this month. ka |
From: Kevin A. <al...@se...> - 2004-09-28 17:03:18
|
On Sep 28, 2004, at 8:50 AM, Michael Redmond wrote: > I have checked out PythonCard 0.8.1 from CVS, and I consistently get > the following error message when I run resourceEditor. resourceEditor > actually loads, but the component menu is blank: > > Traceback (most recent call last): > File "C:\BigSnake\lib\site-packages\wx\_core.py", line 10673, in > <lambda> > lambda event: event.callable(*event.args, **event.kw) ) > File > "C:\BigSnake\Lib\site- > packages\PythonCard\tools\resourceEditor\resourceEd > itor.py", line 85, in on_initialize > self.buildComponentsMenu() > File > "C:\BigSnake\Lib\site- > packages\PythonCard\tools\resourceEditor\resourceEd > itor.py", line 285, in buildComponentsMenu > resource.loadComponentModule(name) > File "C:\BigSnake\Lib\site-packages\PythonCard\resource.py", line > 30, in loadC > omponentModule > raise ImportError, message > ImportError: cannot import module 'floatcanvas > > I am using python 2.3.4 and wxPython 2.5.2.8 for Python 2.3 > > I checked out PythonCard from CVS, and installed from the windows > binary file created by this command: > python setup.py --bdist_wininst > > Any ideas? I have uninstalled python, wxPython and PythonCard and > installed into a new location. Module floatcanvas does live in > several locations in under my Python installation: > > ..\site-packages\PythonCard\components > ..\site-packages\PythonCard\samples > ..\site-packages\PythonCard\samples\floatCanvasTest > ..\site-packages\PythonCard\build\lib\Pythoncard\components > ..\site-packages\wx\lib > ..\site-packages\wx\demo > ..\site-packages\wx\lib\floatcanvas > ..\site-packages\wxPython\lib > > To ask a very Newbie question, when an import statement is made, how > does python know where to look for the module? Could I possibly have > a path problem? > > I did not have this problem when I was using the 0.8 windows binary > distro of PythonCard from sourceforge.net Hmm, I'm not seeing that problem on either my Windows or Mac box. The PythonCard/components/floatcanvas.py module does its import of the wxPython FloatCanvas class as from wx.lib.floatcanvas import FloatCanvas as FCanvas in order to avoid name collision problems. In resource.py it should be attempting to load the component from the PythonCard/components directory and for some reason on your box that is causing an exception. Does the floatCanvasTest sample also fail? This won't be exactly the same, but start Python and at the >>> prompt type from PythonCard.components import floatcanvas and see if that also throws an exception. How about if you do that from the codeEditor shell? Does it make any difference what directory you start in if you run from the command-line? You can check your path that Python uses to import modules and packages with the following lines in the shell: import sys sys.path Is anyone else working from cvs seeing this problem?! BTW, there is a problem with the actual wx.lib.floatcanvas module since Chris used the method name Move when he shouldn't have. It has been changed to MoveImage along with the call to Move in the code, but that isn't in wxPython 2.5.2.8, so you would have to change it yourself. If nothing else works, I suggest simply renaming components/floatcanvas.py to floatcanvas.txt or something like that so that the resourceEditor doesn't attempt to import it until we get this problem figured out. ka |
From: Michael R. <MRe...@be...> - 2004-09-28 15:51:00
|
I have checked out PythonCard 0.8.1 from CVS, and I consistently get the = following error message when I run resourceEditor. resourceEditor = actually loads, but the component menu is blank: Traceback (most recent call last): File "C:\BigSnake\lib\site-packages\wx\_core.py", line 10673, in = <lambda> lambda event: event.callable(*event.args, **event.kw) ) File "C:\BigSnake\Lib\site-packages\PythonCard\tools\resourceEditor\resou= rceEd itor.py", line 85, in on_initialize self.buildComponentsMenu() File "C:\BigSnake\Lib\site-packages\PythonCard\tools\resourceEditor\resou= rceEd itor.py", line 285, in buildComponentsMenu resource.loadComponentModule(name) File "C:\BigSnake\Lib\site-packages\PythonCard\resource.py", line 30, in = loadC omponentModule raise ImportError, message ImportError: cannot import module 'floatcanvas I am using python 2.3.4 and wxPython 2.5.2.8 for Python 2.3 I checked out PythonCard from CVS, and installed from the windows binary = file created by this command: python setup.py --bdist_wininst Any ideas? I have uninstalled python, wxPython and PythonCard and = installed into a new location. Module floatcanvas does live in several = locations in under my Python installation: ..\site-packages\PythonCard\components ..\site-packages\PythonCard\samples ..\site-packages\PythonCard\samples\floatCanvasTest ..\site-packages\PythonCard\build\lib\Pythoncard\components ..\site-packages\wx\lib ..\site-packages\wx\demo ..\site-packages\wx\lib\floatcanvas ..\site-packages\wxPython\lib To ask a very Newbie question, when an import statement is made, how does = python know where to look for the module? Could I possibly have a path = problem? I did not have this problem when I was using the 0.8 windows binary distro = of PythonCard from sourceforge.net |
From: Kevin A. <al...@se...> - 2004-09-28 14:54:05
|
On Sep 28, 2004, at 7:30 AM, ni...@ja... wrote: > Quoting Kevin Altis <al...@se...>: > > >> wxWidgets bug >> >> http://sourceforge.net/tracker/? >> func=detail&aid=665381&group_id=9863&atid=109863 >> >> Use ScrollLines(-1). >> >> I've brought up this bug on wx-users many times in the past and it has >> never gotten any attention, so I think it may be time to just add a >> line to the appendText method to workaround it. AFAIK, this only >> impacts Windows. > > The WX devs dont seem to have time to fix that, I see you logged it > over a year > ago. > > With my setup [pythong 2.3.3, wxPython 2.5, PythonCard 0.8] the > ScrollLines(-1) > scrolls back 1 line. I need it to scroll back to line 1, the start, so > ScrollLines(-100) should always manage that. > > Thanks for your help > Nick. > Okay, what you want is different than the specified behavior of AppendText, so your solution or setInsertionPoint should work fine. There is actually mention of that issue in the doc string. If you don't want the display to change call Freeze() before you append the text and Thaw() afterwards. """Appends the text to the end of the text widget. After the text is appended, the insertion point will be at the end of the text widget. If this behavior is not desired, the programmer should use getInsertionPoint and setInsertionPoint.""" I just checked in the ScrollLines(-1) workaround for the TextArea component on Windows. ka |
From: <ni...@ja...> - 2004-09-28 14:31:03
|
Quoting Kevin Altis <al...@se...>: > wxWidgets bug > > http://sourceforge.net/tracker/? > func=detail&aid=665381&group_id=9863&atid=109863 > > Use ScrollLines(-1). > > I've brought up this bug on wx-users many times in the past and it has > never gotten any attention, so I think it may be time to just add a > line to the appendText method to workaround it. AFAIK, this only > impacts Windows. The WX devs dont seem to have time to fix that, I see you logged it over a year ago. With my setup [pythong 2.3.3, wxPython 2.5, PythonCard 0.8] the ScrollLines(-1) scrolls back 1 line. I need it to scroll back to line 1, the start, so ScrollLines(-100) should always manage that. Thanks for your help Nick. ------------------------------------------------- Everyone should have http://www.freedom2surf.net/ |
From: Kevin A. <al...@se...> - 2004-09-28 14:17:43
|
On Sep 28, 2004, at 4:43 AM, ni...@ja... wrote: > Hi folks, > > I have a problem with a TextArea on my app. > The TextArea initially has no text, but when a user presses the > 'search' button > it punts the results into the TextArea using .appendText(). > > This works brilliantly. However, when the results contains more data > than can > fit into the TextArea without it scrolling on the vertical, the > TextArea does > not show the text, I need to scroll up to see it. > > Unfortunately I haven't seen a way to fix this little niggle, can it > be done ? > > Many thanks > Nick. > wxWidgets bug http://sourceforge.net/tracker/? func=detail&aid=665381&group_id=9863&atid=109863 Use ScrollLines(-1). I've brought up this bug on wx-users many times in the past and it has never gotten any attention, so I think it may be time to just add a line to the appendText method to workaround it. AFAIK, this only impacts Windows. ka |
From: <ni...@ja...> - 2004-09-28 13:18:46
|
Quoting Alex Tweedly <al...@tw...>: > There are various ways - probably many better than this one - but the > easiest is > self.components.TextArea1.ScrollLines(999999) > (or some other suitably large number :-) That does the trick, thankyou. Except I used .ScrollLines(-1000) Thanks again, Nick. ------------------------------------------------- Everyone should have http://www.freedom2surf.net/ |
From: Alex T. <al...@tw...> - 2004-09-28 12:42:02
|
At 12:43 28/09/2004 +0100, ni...@ja... wrote: >Hi folks, > >I have a problem with a TextArea on my app. >The TextArea initially has no text, but when a user presses the 'search' >button >it punts the results into the TextArea using .appendText(). > >This works brilliantly. However, when the results contains more data than can >fit into the TextArea without it scrolling on the vertical, the TextArea does >not show the text, I need to scroll up to see it. > >Unfortunately I haven't seen a way to fix this little niggle, can it be done ? Right - adding to the text doesn't automatically scroll for you. There are various ways - probably many better than this one - but the easiest is self.components.TextArea1.ScrollLines(999999) (or some other suitably large number :-) ScrollLines will move you that many lines, if possible (i.e. it's a relative move, not an absolute number) -- Alex. |
From: <ni...@ja...> - 2004-09-28 11:43:49
|
Hi folks, I have a problem with a TextArea on my app. The TextArea initially has no text, but when a user presses the 'search' button it punts the results into the TextArea using .appendText(). This works brilliantly. However, when the results contains more data than can fit into the TextArea without it scrolling on the vertical, the TextArea does not show the text, I need to scroll up to see it. Unfortunately I haven't seen a way to fix this little niggle, can it be done ? Many thanks Nick. ------------------------------------------------- Everyone should have http://www.freedom2surf.net/ |
From: jamesr <cir...@gm...> - 2004-09-27 20:38:25
|
Hello all, last night i was working with an application in pythoncard and decided I really wanted to have a resizeable window - that is - with the components growing and shrinking Resizer like. That isn't supported natively in pycard; and I am a stubborn person. I realize there is a wxPython way of doing this (i have the usage examples right here) but i like staying in pycard world. It has something to do with destroying cryptic C-inherited syntax, and a little DIY syndrome. So, I wrote one, and I'd like to share it. If you just want to see it, go to http://telecend.hopto.org/sizer/ It's a small class, "sizer" in sizer.py, and aside from importing the module, you can have yummy resizer widget action in just two easy steps! okay, this is not a commerical for a veg-o-matic, but here is the clipped example code: #################### import sizer ... ... def on_initialize(self, event): self.resizer = sizer.sizer(self) #setup resizer information: self.resizer.bulkAdd( {self.components.widget1: {"grow": "xy"}, self.components.widget2: {"grow": "y", "pos": "x"}, self.components.widget3: {"grow": "x"} } ) ... ... def on_size(self,event): self.resizer.onSizeEvent(self, event) ####################### And that's it! You can use the bulkAdd() (or addWidget() one by one) to register the widgets. Then, the only thing you specifiy is a string "xy" or "x" or "y" (don't include it if you don't want it) for the "grow" and "pos" entries. Here is a sentence or two to make how to use it clear, If you want a widget to GROW along with the window when the window is resized (like a text area),then tell it which way it can grow when the window is resized, "x" and/or "y". If you want a widget, like a button, to MOVE (keep a certain relation to the border), then tell it which way it can move when the window is resized, "x" and/or "y". These can be used simultaneously too. I think it's really easy, if you look at it and give it a whirl. So -- if you go to http://telecend.hopto.org/sizer/ you'll be able to get and play with it. Drop me a line if you have a comment, i am trying to get started on contributing when and where I can. James Robey, Maryland |
From: Kevin A. <al...@se...> - 2004-09-27 19:25:17
|
On Sep 27, 2004, at 11:18 AM, Heimburger, Ralph P wrote: > I know there is a timer example in the PythonCard sample applications > but I would like to know if anyone has implemented an inactivity > timeout: If a user does not press a key or click within PythonCard app > for a period of time, it will issue a self.Close(). > The jabberChat sample has a simplistic implementation based on just checking whether the mouse has moved, so take a look at that. There was a question about something like this on the wxPython-users mailing list, so you might want to ask there as well. I think the person on wxPython-users was looking for a way of tapping into operating system APIs that showed overall system inactivity and wasn't specific to just their application. The problem is that once your application is deactivated by the user switching to another application or minimizing your application you won't know if the user is actually active or not on the system. The global mouse position is a rough hack, but it obviously doesn't catch the case of the keyboard intensive user that avoids the mouse. If the application is active and the cursor is in an editable field you should see idle events as the event queue empties; idle in wxPython and PythonCard terms simply means that the event queue just emptied, it does not mean the system is actually idle, which is one reason I've considered changing the event name. But you'll want to be more specific than that. To check for the user being idle in your application you want to check for key presses as well as mouse movement or mouse presses. Assuming you don't have any component-specific handlers for mouseDown or keyDown, you might add some handlers in addition to the the check for mouse movement such as: def on_keyDown(self, event): self.userIsIdle = False event.skip() def on_mouseDown(self, event): self.userIsIdle = False event.skip() Then you'll also want a timer handler that runs every second, that saves the current time when userIdle is False. When userIsIdle is True and your specified amount of time has passed then you can call self.close(). Something like: if not self.userIdle: self.lastTimeUserNotIdle = time.time() else: if time.time() - self.lastTimeUserNotIdle > self.idleTimeout: # idleTimeout should be specified in seconds self.close() I didn't test the code, but that's the general idea. You still need to check whether the mouse has moved globally in your timer handler rather than in a mouseMove handler because you won't get a mouseMove unless it is over one of your components, so just borrow that code from jabberChat. ka |
From: Heimburger, R. P <rph...@ba...> - 2004-09-27 18:19:38
|
I know there is a timer example in the PythonCard sample applications but I would like to know if anyone has implemented an inactivity timeout: If a user does not press a key or click within PythonCard app for a period of time, it will issue a self.Close(). Thanks in advance, Ralph Heimburger=20 Babcock & Wilcox Enterprise Systems 330-860-1858 |
From: Kevin A. <al...@se...> - 2004-09-27 15:39:27
|
On Sep 27, 2004, at 1:34 AM, XXXXXXXXXXX wrote: > > Oooh! A password field....nice :-) I've built a couple of support tools > to help me out at customer sites, and logon/password protection would > be > helpful. Thanks for reading my mind. There was already a PasswordField component that you could use in a Background. You could also pass in a style flag to the textEntryDialog to get the password and multi-line variations of the dialog, but I figured we might as well just make them standalone functions for simplicity. Hope it helps. > Kevin...what's the schedule for releasing 0.8.1, or whatever the next > version is? I haven't got around to accessing via CVS yet because 0.8 > has > more than kept me occupied so far. Just curious. > Originally I planned on releasing 0.8.1 sometime in September, but my guess is it will be sometime in October. Release 0.8 didn't turn out to have as many bugs as I thought it might considering all the major changes, so I don't think anyone is clamoring for a new release. As the fall progresses, more and more of my time will be sucked away by the deluge of videogames though, so I want to get a release out before the coding sprint in Seattle (Oct. 23-24). That way if if I'm not doing much coding in October and November people will at least have the changes added in the last month. This is what the change log shows as of this morning... Release 0.8.1 2004-10-?? added time alias to util.py to use time.time() on Windows, time.clock() on *nix added gravity sample minimum requirement changed to wxPython 2.5.2.8 added passwordTextEntryDialog and multilineTextEntryDialog to dialog.py many minor bug fixes reworked dialogs sample interface added Show Grid Lines option to resourceEditor added cursor key support in resourceEditor for moving components added FloatCanvas component and sample added Notebook component, PageBackground, and testNotebook sample added relativePath to util.py added colorFromString to util.py added main_is_frozen workaround for bundlebuilder standalones on Mac added csv support to dbBrowser sample ka |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2004-09-27 08:53:14
|
On Sat, 25 Sep 2004 09:11:37 -0700, Kevin Altis wrote: >I just changed the minimum requirement for running PythonCard to >wxPython 2.5.2.8 in order to get rid of some workaround code in >dialog.py that I did for wxPython 2.5.2.7. If you're working from cvs, >you'll need to update your version of wxPython. > >I added a passwordTextEntryDialog and multilineTextEntryDialog to >dialog.py. (Apologies to the moderator AGAIN...I posted this with the wrong email address to begin with) Oooh! A password field....nice :-) I've built a couple of support tools to help me out at customer sites, and logon/password protection would be helpful. Thanks for reading my mind. Kevin...what's the schedule for releasing 0.8.1, or whatever the next version is? I haven't got around to accessing via CVS yet because 0.8 has more than kept me occupied so far. Just curious. Neil |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2004-09-27 07:38:26
|
On Fri, 24 Sep 2004 02:47:36 +0100, Alex Tweedly wrote: >btw - this answer is from a combination of docs and source code - i.e. I >haven't actually test it - but I'm fairly sure it's right. If not, my >apologies .... Both suggestions work fine here (PythonCard 0.8, Mac OSX). Neil |
From: Alex T. <al...@tw...> - 2004-09-26 22:09:44
|
At 13:37 26/09/2004 -0700, Kevin Altis wrote: >The issue of providing alternate styles for the underlying controls with >PythonCard has been a long-standing one, so let me give a little >background before suggesting some possible solutions. I would like to get >feedback on the styleOverride idea below. > >There has been a general goal of focusing on the most commonly used style >for a component as the default and if there are multiple common variations >then there are typically extra attributes that let you choose those styles >as alternatives. Most of the underlying wxPython controls, only let you >set the style when the control is initialized, so the style information >must be available during the __init__ method of the component. For a long >time PythonCard also avoided wrapping components or supporting styles that >weren't available on all platforms, to simplify writing cross-platform >code. That is no longer true, and so you have controls like the >IEHtmlWindow which only works on Windows. On the other hand, the TextArea >control will continue to use the wx.TE_RICH2 style so that it behaves >almost identically on Mac, Linux, and Windows. > >Personally, I don't want to have a corresponding style attribute for every >possible style available in the underlying wxPython control since more >choices just makes it more difficult to use, so the trick is figuring out >which are the common cases and supporting those. In the case of the >horizontal scrollbar, which is optional on Windows, but not on GTK, I can >see having a specific attribute to control the setting, but it still won't >allow the scrollbar to be toggled once the control is created because >wxWidgets doesn't support that. Yes, I like the fact that I don't get presented with a large number of choices when 99% of the time I want none or very few of them. >A general solution to this problem would be to have something like a >styleOverride attribute for components that would be for expert users that >need complete control over the style flags. One implementation that might >work would be to make it a list of strings such as ['wx.TE_RICH2', >'wx.TE_MULTILINE', 'wx.HSCROLL']. By default styleOverride would be None, >but if it exists, each style string would be converted into a style flag >using eval() and logically ORed (|) with the other styles and used instead >of the normal style processing. That power would also mean you could >easily create a program that wouldn't run correctly, especially if you >made a typo, but also because you didn't include all the required style >options, so it definitely would be an expert option and I'm not sure what >changes might be necessary to protect normal users from styleOverride in >the resourceEditor. Anyone have opinions on this idea? Sounds really scary. You said ".... and used instead of the normal style processing." I'd rather see something that would be used in addition to the normal style, rather than replacing it. As a replacement, I'd never be able to use it without going to check in the Pythoncard source code which styles were used for the default, and duplicating them. I'd rather see it be a list of words that would be XOR'ed into the standard style (or simply OR'ed in, and allow a "no" format like "no wx.TE_MULTILINE" to remove any of the defaults). Even better might be to make it like Color or Font and have a pop-up dialog for styleOverride that presented either a set of checkboxes, or a multichoice list (with a button to "Reset Defaults"). The words set in the default could be already checked, making it easy to vary as needed. -- Alex. |
From: Kevin A. <al...@se...> - 2004-09-26 21:15:13
|
On Sep 26, 2004, at 1:38 PM, imene.mbazaa wrote: > Hello everybody:-) > =A0 > My name is Imene (I'm a girl:-)), I'm a computer engeneering. > =A0 > I'm using Python language. > I'm working with Python 2.3 and wxPython 2.4 on Boa platform=A0 > I need to add a component (a wx component) ; can you indicate me how=20= > to do so. > =A0 > Thanks in advance:-) > I think you have the wrong mailing list. If you are using Boa and=20 programming using wxPython then you probably want to direct your=20 question to the wxPython-users mailing list. http://www.wxpython.org/maillist.php If you're asking how to wrap a wxPython control as a PythonCard=20 component, then please provide the name of the specific control you are=20= interested in, description of your needs, etc. It might be that the=20 control is already wrapped, but has a different name in PythonCard or=20 another component would meet your needs. ka |
From: Alex T. <al...@tw...> - 2004-09-26 21:09:26
|
At 12:23 26/09/2004 -0700, Gordon Webster wrote: >Dear Pythoncard BB > >I have created a TextArea control in my app, it >automatically has a vertical scroll bar but the text >is too wide for the control. How do I tell it to >include a horizontal scroll bar? At the moment you can't. wxWidgets doesn't support setting wx.HSCROLL except when the underlying TextCtrl is being created. I've enclosed a version of PythonCard/components/textarea.py - you can (temporarily) replace your copy with this, and then you can use the resourceEditor to set hscroll (to 1 or 0) [ I want to Kevin's ok to this approach before committing it to cvs ] >I still don't understand how i get at the wx level of >a given pythoncard control - what is the hook? >I tried suff like e.g. >self.components.myTextArea.style = wx.HSCROLL. >Any help would be greatly appreciated. There are no >horizontal scrollbars in any of the sample apps. Problem is that style isn't changeable after being created (unless I missed something in wxWidgets docs). Here are the changes (or just use the attached file) >Index: textarea.py >=================================================================== >RCS file: /cvsroot/pythoncard/PythonCard/components/textarea.py,v >retrieving revision 1.27 >diff -c -r1.27 textarea.py >*** textarea.py 25 Sep 2004 03:21:20 -0000 1.27 >--- textarea.py 26 Sep 2004 21:05:35 -0000 >*************** >*** 21,26 **** >--- 21,27 ---- > 'editable' : {'presence' : 'optional', 'default' : 1}, > 'alignment' : {'presence' : 'optional', 'default' : 'left', > 'values' :['left', 'right', 'center']}, > 'border' : {'presence' : 'optional', 'default' : '3d', > 'values' :['3d', 'none']}, >+ 'hscroll' : {'presence' : 'optional', 'default' : 0}, > 'size' : { 'presence' : 'optional', 'default' : [ -1, 50 ] }, > } > widget.WidgetSpec.__init__( self, 'TextArea', 'TextField' , > events, attributes ) >*************** >*** 39,44 **** >--- 40,49 ---- > borderStyle = wx.NO_BORDER > else: > borderStyle = 0 >+ if aResource.hscroll == 1: >+ hScroll = wx.HSCROLL >+ else: >+ hScroll = 0 > > self._alignment = aResource.alignment > >*************** >*** 54,60 **** > ## style = wx.TE_RICH2 | wx.TE_PROCESS_TAB | > wx.TE_MULTILINE | borderStyle | \ > style = wx.TE_RICH2 | wx.TE_MULTILINE | borderStyle | \ > textfield.getAlignment(aResource.alignment) | \ >! wx.NO_FULL_REPAINT_ON_RESIZE | wx.CLIP_SIBLINGS, > name = aResource.name ) > > widget.Widget.__init__(self, aParent, aResource) >--- 59,65 ---- > ## style = wx.TE_RICH2 | wx.TE_PROCESS_TAB | > wx.TE_MULTILINE | borderStyle | \ > style = wx.TE_RICH2 | wx.TE_MULTILINE | borderStyle | \ > textfield.getAlignment(aResource.alignment) | \ >! wx.NO_FULL_REPAINT_ON_RESIZE | wx.CLIP_SIBLINGS | hScroll, > name = aResource.name ) > > widget.Widget.__init__(self, aParent, aResource) -- Alex. |
From: imene\.mbazaa <ime...@la...> - 2004-09-26 20:38:23
|
Hello everybody:-) My name is Imene (I'm a girl:-)), I'm a computer engeneering. I'm using Python language. I'm working with Python 2.3 and wxPython 2.4 on Boa platform I need to add a component (a wx component) ; can you indicate me how to d= o so. Thanks in advance:-)=0A=0AAcc=E9dez au courrier =E9lectronique de La Post= e : www.laposte.net ; =0A3615 LAPOSTENET (0,34=80/mn) ; t=E9l : 08 92 68 = 13 50 (0,34=80/mn)=0A=0A |
From: Kevin A. <al...@se...> - 2004-09-26 20:37:20
|
On Sep 26, 2004, at 12:23 PM, Gordon Webster wrote: > Dear Pythoncard BB > > I have created a TextArea control in my app, it > automatically has a vertical scroll bar but the text > is too wide for the control. How do I tell it to > include a horizontal scroll bar? > > I still don't understand how i get at the wx level of > a given pythoncard control - what is the hook? > > I tried suff like e.g. > self.components.myTextArea.style = wx.HSCROLL. > > Any help would be greatly appreciated. There are no > horizontal scrollbars in any of the sample apps. > > Best > > Gordon > The issue of providing alternate styles for the underlying controls with PythonCard has been a long-standing one, so let me give a little background before suggesting some possible solutions. I would like to get feedback on the styleOverride idea below. There has been a general goal of focusing on the most commonly used style for a component as the default and if there are multiple common variations then there are typically extra attributes that let you choose those styles as alternatives. Most of the underlying wxPython controls, only let you set the style when the control is initialized, so the style information must be available during the __init__ method of the component. For a long time PythonCard also avoided wrapping components or supporting styles that weren't available on all platforms, to simplify writing cross-platform code. That is no longer true, and so you have controls like the IEHtmlWindow which only works on Windows. On the other hand, the TextArea control will continue to use the wx.TE_RICH2 style so that it behaves almost identically on Mac, Linux, and Windows. Personally, I don't want to have a corresponding style attribute for every possible style available in the underlying wxPython control since more choices just makes it more difficult to use, so the trick is figuring out which are the common cases and supporting those. In the case of the horizontal scrollbar, which is optional on Windows, but not on GTK, I can see having a specific attribute to control the setting, but it still won't allow the scrollbar to be toggled once the control is created because wxWidgets doesn't support that. A general solution to this problem would be to have something like a styleOverride attribute for components that would be for expert users that need complete control over the style flags. One implementation that might work would be to make it a list of strings such as ['wx.TE_RICH2', 'wx.TE_MULTILINE', 'wx.HSCROLL']. By default styleOverride would be None, but if it exists, each style string would be converted into a style flag using eval() and logically ORed (|) with the other styles and used instead of the normal style processing. That power would also mean you could easily create a program that wouldn't run correctly, especially if you made a typo, but also because you didn't include all the required style options, so it definitely would be an expert option and I'm not sure what changes might be necessary to protect normal users from styleOverride in the resourceEditor. Anyone have opinions on this idea? If you want a solution today, then you can make your own TextArea component that uses the wx.HSCROLL style. A better solution might be to simply use the CodeEditor component since it supports unwrapped text and a horizontal scrollbar already. The life sample uses the CodeEditor component for both the Lexicon and Patterns windows. The CodeEditor component does allow wrapped text to be toggled on and off. ka |
From: <gwa...@ya...> - 2004-09-26 19:25:01
|
Dear Pythoncard BB I have created a TextArea control in my app, it automatically has a vertical scroll bar but the text is too wide for the control. How do I tell it to include a horizontal scroll bar? I still don't understand how i get at the wx level of a given pythoncard control - what is the hook? I tried suff like e.g. self.components.myTextArea.style = wx.HSCROLL. Any help would be greatly appreciated. There are no horizontal scrollbars in any of the sample apps. Best Gordon ===== :::::::::: Gordon Webster :::::::::: |
From: Gordon W. <gor...@ya...> - 2004-09-26 19:23:24
|
Dear Pythoncard BB I have created a TextArea control in my app, it automatically has a vertical scroll bar but the text is too wide for the control. How do I tell it to include a horizontal scroll bar? I still don't understand how i get at the wx level of a given pythoncard control - what is the hook? I tried suff like e.g. self.components.myTextArea.style = wx.HSCROLL. Any help would be greatly appreciated. There are no horizontal scrollbars in any of the sample apps. Best Gordon |